UAMike Posted December 21, 2015 Report Share Posted December 21, 2015 I am trying to figure out a more reliable way to type text. Currently, I have blocks of text set to variables and I am using the textype function. While this works most of the time, if I have a longer macro and/or hardware/software lag issues, I have found that typing one keystroke at a time can be unreliable. I was thinking that a better solution might be to set the clipboard text to my variable and then use the clipboard paste function. Is there a way to do this? I am not sure if any of the clipboard functions in MEX Pro do this. I am want to do something like 'Variable Set String from Clipboard" -- only the reverse of that. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
rberq Posted December 21, 2015 Report Share Posted December 21, 2015 Variable Modify String [Option 2 tab] / Save to Clipboard is where that function is "hidden" in ME3. Test carefully -- I have sometimes had bad results in pasting via the clipboard. I don't know but what it is a timing issue, like Copy to Clipboard which takes an unpredictable amount of time to complete??? You can try setting the keyboard delay time which might make text typing more reliable. Generally I have found 30ms to be more than enough. Quote Link to comment Share on other sites More sharing options...
Samrae Posted December 21, 2015 Report Share Posted December 21, 2015 There are macro commands to copy to and from the clipboard. Try something like this: Variable Set String %Temp% to "This is a test." Variable Modify String: Save %Temp% to the clipboard The Text Type command has an option to "Use Clipboard and Paste Text". By default this is set to "Simulate Keystrokes". Using this option you don't even need to use the Variable Modify String command. Sometimes I want to keep the text on the clipboard so I have my macro save and restore it, like this: Variable Set String %ClipboardSave% from the clipboard contents // Save the content of the clipboard Variable Set String %Temp% to "This is a test." Variable Modify String: Save %Temp% to the clipboard Variable Modify String: Save %ClipboardSave% to the clipboard // Restore the content of the clipboard Quote Link to comment Share on other sites More sharing options...
UAMike Posted December 22, 2015 Author Report Share Posted December 22, 2015 Variable Modify String [Option 2 tab] / Save to Clipboard is where that function is "hidden" in ME3. Test carefully -- I have sometimes had bad results in pasting via the clipboard. I don't know but what it is a timing issue, like Copy to Clipboard which takes an unpredictable amount of time to complete??? You can try setting the keyboard delay time which might make text typing more reliable. Generally I have found 30ms to be more than enough. There are macro commands to copy to and from the clipboard. Try something like this: Variable Set String %Temp% to "This is a test." Variable Modify String: Save %Temp% to the clipboard The Text Type command has an option to "Use Clipboard and Paste Text". By default this is set to "Simulate Keystrokes". Using this option you don't even need to use the Variable Modify String command. Sometimes I want to keep the text on the clipboard so I have my macro save and restore it, like this: Variable Set String %ClipboardSave% from the clipboard contents // Save the content of the clipboard Variable Set String %Temp% to "This is a test." Variable Modify String: Save %Temp% to the clipboard Variable Modify String: Save %ClipboardSave% to the clipboard // Restore the content of the clipboard Thank you both! 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.