terrypin Posted November 9, 2016 Report Share Posted November 9, 2016 I've tried the Variable Set String (from clipboard) in several macros and I seem to be getting extremely long delays. Here's a simplified example using any file opened in Notepad. With the Variable Set command, it takes 4 secs before the macro ends. Without, a fraction of a second. I'd appreciate feedback on whether others can reproduce please. Commands: // Run from a file opened in Notepad, for example Text Type (Simulate Keystrokes): <ALT>fa // Opens the Save As dialog Delay: 0.1 seconds Clipboard Copy Delay: 0.1 seconds // It appears that following command takes nearly 4 secs to complete. Without it, the macro runs in a flash. Variable Set String %tName% from the clipboard contents Delay: 0.1 seconds Text Type (Simulate Keystrokes): <ESC> // Close Save As dialog. Code: <COMMENT Value="Run from a file opened in Notepad, for example"/> <TEXT TYPE Action="0" Text="<ALT>fa" _COMMENT="Opens the Save As dialog"/> <DELAY Flags="\x01" Time="0.1"/> <CLIPBOARD COPY/> <DELAY Flags="\x01" Time="0.1"/> <COMMENT Value="It appears that following command takes nearly 4 secs to complete. Without it, the macro runs in a flash. "/> <VARIABLE SET STRING Option="\x02" Destination="%tName%" NoEmbeddedVars="FALSE"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT TYPE Action="0" Text="<ESC>" _COMMENT="Close Save As dialog."/> Macro file attached, or here: https://dl.dropboxusercontent.com/u/4019461/TestVariableSetDelay.mex -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
rberq Posted November 9, 2016 Report Share Posted November 9, 2016 Running ME3 with Windows 7. I have many macros that run this generic copy-to-clipboard macro, and very fast response time for all. Preference for clipboard delay is set to zero, with the macro itself determining whether the copy has completed or not. Clipboard Empty // Copy to clipboardClipboard Copy// Loop until clipboard is non-null, that is, copy to clipboard has completed. Since the value// to be copied may in fact BE null, we limit the loop to a nominal 1 second, then quit, leaving it null.// (Due to overhead, the actual loop time will be more like 2 seconds than 1.)Repeat Start (Repeat 50 times) Delay 20 Milliseconds If Clipboard Text Equals "" Else Repeat Exit End IfRepeat End Variable Set String %T1% from Clipboard Quote Link to comment Share on other sites More sharing options...
terrypin Posted November 9, 2016 Author Report Share Posted November 9, 2016 Thanks, but it's not the Clibpoard Copy that's taking the almost 4 secs. However, just to check if your repeat loop somehow makes a difference, I replaced my Clipboard Copy with that alternative. Still 4 seconds. Could you run my macro and check how long it takes please? -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Cory Posted November 9, 2016 Report Share Posted November 9, 2016 I timed a clipboard copy command on my machine and it's nearly instant. Are you using a clipboard manager utility? Quote Link to comment Share on other sites More sharing options...
rberq Posted November 9, 2016 Report Share Posted November 9, 2016 Thanks, but it's not the Clibpoard Copy that's taking the almost 4 secs. Yes, I understand. It's the "Variable Set String %tName% from the clipboard contents" that is taking 4 seconds for you. The last line of my sample macro is "Variable Set String %T1% from Clipboard" to match yours, and mine runs in way less than one second. So the answer is, No, I can't get it to run slow like yours does. Again, note that I am running ME3, not ME Pro. Quote Link to comment Share on other sites More sharing options...
terrypin Posted November 9, 2016 Author Report Share Posted November 9, 2016 I timed a clipboard copy command on my machine and it's nearly instant. Are you using a clipboard manager utility? I didn't ask about the clipboard copy command. Quote Link to comment Share on other sites More sharing options...
terrypin Posted November 9, 2016 Author Report Share Posted November 9, 2016 Yes, I understand. It's the "Variable Set String %tName% from the clipboard contents" that is taking 4 seconds for you. The last line of my sample macro is "Variable Set String %T1% from Clipboard" to match yours, and mine runs in way less than one second. So the answer is, No, I can't get it to run slow like yours does. Again, note that I am running ME3, not ME Pro. Thanks, that's focused my mind. So it looks like it's something uniquely about my set up here. (I don't think the ME3 v ME Pro distinction is significant.) In the last hour or so I've begun to suspect it might somehow involve my external USB HD 'waking up'. At some point in my testing, one of the files involved was saved on that drive. Looks like a link has been 'remembered'. I'll pursue that tomorrow. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Cory Posted November 10, 2016 Report Share Posted November 10, 2016 I misspoke. I meant the command to set a string from the clipboard. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.