jmb4370 Posted August 26, 2004 Report Share Posted August 26, 2004 After working through all the helpful examples in this forum and in the book MacroExpressExplained, I got my macro to work, but I found a little quirk that I think is worth mentioning. The command that gets run by the Run Macro in Variable command is the Variable Modify String command. I noticed when the command was viewed in the direct editor, the variables are referred to with two digits (01, 02, 03 etc). If my dynamic variable had only a one digit value, the command needed a '0' preceding the variable name, or the entire program of Macro Express would crash! I ended up using a simple IF statement to write the command both with and without the extra '0' for single or double digit values of the replaceable variable, N1 Repeat Until %T1% <> %T1% If Variable %N1% <=9 Variable Set String %T1% "<TMVAR2:09:01:0%N1%:000:000:>" Else If Variable %N1% >=10 Variable Set String %T1% "<TMVAR2:09:01:%N1%:000:000:>" End If End If Run Macro in Variable %T1% ... ... ... End Repeat Quote Link to comment Share on other sites More sharing options...
joe Posted August 27, 2004 Report Share Posted August 27, 2004 Yes. Most, but not all, of the sections within a Macro Express command are a fixed length. This can look real strange for coordinate positioning fields, which will accept literal, variable, and text values: :000000: :000256: :00%N2%: :0%N88%: :Center: :Bottom: :000Top: are all six characters in length. 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.