problem with IF condition

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
usernamechan
Newbie
Posts: 10
Joined: Wed Apr 18, 2007 5:51 pm

problem with IF condition

Post by usernamechan » Wed Apr 18, 2007 6:10 pm

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
Last edited by usernamechan on Tue Feb 01, 2011 12:24 pm, edited 1 time in total.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Apr 18, 2007 7:13 pm

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
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts