sunilvedula Posted January 16, 2008 Report Share Posted January 16, 2008 Hi, i make the macro copy a number and it does option A(a set of steps). Next time when i repeat it if it copies a text or a blank i want the macro not to do the remaining steps but need to got to option B. How do i do that? Quote Link to comment Share on other sites More sharing options...
kevin Posted January 17, 2008 Report Share Posted January 17, 2008 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% > Quote Link to comment Share on other sites More sharing options...
sunilvedula Posted January 21, 2008 Author Report Share Posted January 21, 2008 Thank you for ur prompt reply. It helps. But just thinking if it copies blank into t1 then when it converts to integer what would the result be? Quote Link to comment Share on other sites More sharing options...
kevin Posted January 21, 2008 Report Share Posted January 21, 2008 Did you try it? To answer your question I would just write a small macro like this: Variable Set String %T1% "" Variable Modify String: Convert %T1% to integer %N1% Text Box Display: Test Okay, the answer is N1 = 0. Quote Link to comment Share on other sites More sharing options...
sunilvedula Posted January 21, 2008 Author Report Share Posted January 21, 2008 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> 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.