Jump to content
Macro Express Forums

how to compare what is copied in a variable is a integer or a text


sunilvedula

Recommended Posts

Use the Variable Modify String: Convert %T1% to integer %N1%[/] command. If N1 is 0 then the string contained non numeric characters.

Variable Set String %T1% "1234"
Variable Modify String: Convert %T1% to integer %N1%
Text Box Display: Test

Variable Set String %T1% "ABC"
Variable Modify String: Convert %T1% to integer %N1%
Text Box Display: Test

Variable Set String %T1% "A1B2C"
Variable Modify String: Convert %T1% to integer %N1%
Text Box Display: Test

<TVAR2:01:01:1234><TMVAR2:05:01:01:000:000:><TBOX4:T:1:CenterCenter000278000200:000:TestT1=%T1%
N1=%N1%
><REM2:><TVAR2:01:01:ABC><TMVAR2:05:01:01:000:000:><TBOX4:T:1:CenterCenter000278000200:000:TestT1=%T1%
N1=%N1%
><REM2:><TVAR2:01:01:A1B2C><TMVAR2:05:01:01:000:000:><TBOX4:T:1:CenterCenter000278000200:000:TestT1=%T1%
N1=%N1%
>

Link to comment
Share on other sites

Hey You know what it work exceedingly fine and thanks a lot for your reply. By the time i was replying to your earlier i was testing it and could not tell you.Now it works fine. what i have done is this:

<TVAR2:04:03:><TMVAR2:05:04:01:000:000:><IFVAR2:2:01:1:0><TBOX4:T:1:000261000308000278000106:000:Hey Success!!!!GOOD WORK>

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