Jump to content
Macro Express Forums

Split a Variable by Symbol

Recommended Posts

I'm trying to take this down to the lowest common denominator, so I can better understand what I'm trying to accomplish. Here is the line I am trying to search within.


"TEXT:Alesci Homes Inc" "3" "1" "" "Alesci Homes Inc § § § 3044 S 92nd St § West


I'm thinking I can put this line into a variable and do the following:




Clear Variables

Clipboard Empty

Window Activate: BLD-Model(WRK)Clean.txt - Boxer Text Editor

// Builder (Variable as one line)

Text Type (Simulate Keystrokes): <HOME><HOME><SHIFT><END>

Clipboard Copy

Delay: 150 milliseconds

Variable Set String %BLD[1]% from the clipboard contents

Delay: 385 milliseconds

Split String "%BLD[1]%" on "§" into %BLD%, starting at 2


The bold is where it's fuzzy. I'm trying to take the value, 3044 S 92nd St , between the two section symbols, §, and creative a variable from that value.

1. Create variable

2. Search for "§" that have a value between them.

3. Trim spaces in front and back of value.

4. Save to a new variable.


Is this the right way to start or is there a better approach?



Link to comment
Share on other sites

  • 2 years later...


Hello Cory, I know this was a long time ago, however I am experiencing the same issue. I downloaded your MEx file and unfortunately I do not have 4.0 or higher and it will not read the file. Would you be willing/able to post the Direct Editor text for this macro? Thx..

Link to comment
Share on other sites

Macro Express 3 does not support the Split String command or array variables. The Direct Editor text for macros is different for Macro Express 3 and Macro Express Pro. If you are not running Macro Express Pro you will not be able to use this macro.


Here is what Cory's sample looks like in the Macro Express Pro Script Editor:

Variable Set String %Sample% to ""TEXT:Alesci Homes Inc" "3" "1" "" "Alesci Homes Inc § § § 3044 S 92nd St § West"
Split String "%Sample%" on "§" into %Result%, starting at 1
Variable Set String %Output% to "%Result[4]%"
Variable Modify String %Output%: Trim
Text Box Display: Output
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...