I couldn't understand why the IF statement returns false. I send %result% to the Message function and Sorry is displayed. So, I couldn't understand why I would get the "Have Job" message (the else statements) from the evaluation of %result%="Sorry". Can anyone explain?
Code Example:
Let>B1_SIZE=4098
LibFunc>hIE,ExtractTag,r,%IE[0]%,main,B,1,0,B1
MidStr>r_6,1,r,B1
Let>result={copy(%B1%,1,5)}
//Message>%result%
IF>%result%="Sorry"
Message>Too Bad
ELSE
Message>Have Job
ENDIF
________
cannabis collective
problem with IF condition
Moderators: Dorian (MJT support), JRL
-
- Newbie
- Posts: 10
- Joined: Wed Apr 18, 2007 5:51 pm
problem with IF condition
Last edited by usernamechan on Tue Feb 01, 2011 12:24 pm, edited 1 time in total.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Macro Scheduler doesn't need quotes for strings. If you include quotes then you are including them in the value. So you probably just want:
If>result=Sorry
If>result=Sorry
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?