Jump to content
Macro Express Forums

Typing Text To Clipboard


duebel13

Recommended Posts

Hi,

 

after two weeks of evaluation, I already have 40+ macros.

Think I'm going to purchase this great piece of software soon. :-)

 

This might be an easy question, but anyway:

 

I want to type some lines of text including new lines to the clipboard so that I later can paste the whole text block. This is what I tried:

 

Clipboard Start Copy

If Variable %T1% <> ""

Text Type: %T1%<ENTER>

If Variable %T2% <> ""

Text Type: %T2%<ENTER>

End If

Else

Text Type: %T3%<ENTER>

End If

...

Clipboard End Copy

 

As you may have expected I end up with the direct editor code in the clipboard.

Instead, I want just the typed text to be there. How do I do this?

 

Must I use string variables? And if so, how do I add carriage return and line feed?

 

Thanks.

 

Regards

Link to comment
Share on other sites

Welcome duebel13,

 

You must first set your Variables...

 

// Copy to clipboard and set clipboard text to variables
Clipboard Copy
Variable Set String %T1% from Clipboard
Clipboard Copy
Variable Set String %T2% from Clipboard
// Past Variables into text
Text Type: %T1%<ENTER>
Text Type: %T2%<ENTER>

Link to comment
Share on other sites

Hi,

I think this is closer to what you want; easier to do your logic with strings and just save the modified string to the clipboard.

Your logic reads this way; is it what you wanted?

Best, Randall

If Variable %T1% <> ""

  Variable Modify String: Copy %T1% to %T99%

//don't need if here if logic does not?

    Variable Modify String: Append %T2% to %T99%

    Variable Modify String: Save %T99% to Clipboard

Else

  Variable Modify String: Save %T3% to Clipboard

End If

<IFVAR2:1:01:2:><TMVAR2:09:99:01:000:000:><TMVAR2:08:99:02:000:000:><TMVAR2:16:99:00:000:000:><ELSE><TMVAR2:16:03:00:000:000:><ENDIF>

(EDIT -woops, i still had your logic wrong? - changed)

Edited by randallc
Link to comment
Share on other sites

Just a quick note or two about the Clipboard Start/End Copy construct:

  • The only command allowed between the Start and End is Text Type.
  • No mnemonics (<Enter>, <Tab>, etc) are allowed. Enter them directly using the keyboard.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...