Jump to content
Macro Express Forums

Help With Editing A Text String


IceBox
 Share

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%

<ASCIIC:1:1:010><ASCIIC:13:1:013><TMVAR2:21:13:00:000:000:%T13%%T13%%T1%>

 

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%

<TMVAR2:21:01:00:000:000:%T13%>

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...
 Share

×
×
  • Create New...