Jump to content
Macro Express Forums

Help With Editing A Text String


Recommended Posts

I am building a macro and one of the steps I need to perform is to copy some text, save it to a variable, and then paste the text somewhere else. However, the original text that I am copying almost always has a hard return in it. I cannot use any hard returns when I paste it though. How do I get Macro Express to recognize these hard returns so I can delete them? I am guessing I would need to use the “Replace Substring” command, leave the “Replace With:” field blank, but what would I put in the “Text to Replace:” field?


Any help would be greatly appreciated!

Link to comment
Share on other sites

Hello IceBox!


The first thing is to create a CR/LF string that Macro Express understands:

Variable Set %T1% to ASCII Char of 010
Variable Set %T13% to ASCII Char of 013
Replace "%T13%" with "%T13%%T1%" in %T13%



Now, as you suspected, use the Replace Substring command to strip the CR/LF from your target string (assume T1 as target). Simply leave the Replace With field empty:

Replace "%T13%" with "" in %T1%


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.

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.

  • Create New...