mfseeker Posted January 2, 2009 Report Share Posted January 2, 2009 How do I get the contents of a string variable into the clipboard for pasting into my target document? There must be a way, but I seem to be in a brain fog. Quote Link to comment Share on other sites More sharing options...
Jeff Cleveland Posted January 2, 2009 Report Share Posted January 2, 2009 Use Variable Modify String > Save to Clipboard Jeff Quote Link to comment Share on other sites More sharing options...
terrypin Posted January 2, 2009 Report Share Posted January 2, 2009 How do I get the contents of a string variable into the clipboard for pasting into my target document? There must be a way, but I seem to be in a brain fog. Just paste the string variable in directly - no need for clipboard. Here's a trivial example: Variable Set String MyVariable1 to "Test string" Window Activate: Textpad Text Type (Simulate Keystrokes): Pasted result = %MyVariable1% Macro Return <VARIABLE SET STRING Option="\x00" Destination="MyVariable1" Value="Test string"/> <WINDOW ACTIVATE Title="Textpad" Exact_Match="FALSE" Wildcards="FALSE"/> <TEXT TYPE Action="0" Text="Pasted result = %MyVariable1%"/> <MACRO RETURN/> Having opened a blank document in my text editor, when I run the above I get the following typed in: Pasted result = Test string -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
mfseeker Posted January 2, 2009 Author Report Share Posted January 2, 2009 Thanks Jeff. I found this 10 seconds before I received your reply. I first thought putting the command under Clipboard commands was more logical. After all, the variable is not "modified." But there are many analogous commands under "Variable Modify String" which copy but don't change the string, so I see how it makes sense--even if the title of the command group is a tad misleading to the slow-witted among us. Quote Link to comment Share on other sites More sharing options...
mfseeker Posted January 2, 2009 Author Report Share Posted January 2, 2009 Thanks Terry. That is certainly the best way. I had even looked at the help for Text Type to see whether this would be possible, but I was in too much of a hurry. I see now that it is plainly documented there. I have only been working with this new Macro Express Pro for a couple of days. I sure do like it. My upgrade purchase is coming right up. Just paste the string variable in directly - no need for clipboard. Here's a trivial example: Variable Set String MyVariable1 to "Test string" Window Activate: Textpad Text Type (Simulate Keystrokes): Pasted result = %MyVariable1% Macro Return <VARIABLE SET STRING Option="\x00" Destination="MyVariable1" Value="Test string"/> <WINDOW ACTIVATE Title="Textpad" Exact_Match="FALSE" Wildcards="FALSE"/> <TEXT TYPE Action="0" Text="Pasted result = %MyVariable1%"/> <MACRO RETURN/> Having opened a blank document in my text editor, when I run the above I get the following typed in: Pasted result = Test string -- Terry, East Grinstead, UK 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.