You wrote:

write "XYZ"  & return to socket tSocket
if "XYZ"  then
   click at the loc of btn "StartXYZ"
else "ABC"  then
   click at the loc of btn "StartShani"
end if

If-then statements will evaluate the condition tokens as true or false and proceed accordingly. So in evaluating your line:

if "XYZ" then...

the engine will look at "XYZ", which is a literal string, and find that this string does not evaluate to "true" and then go to:

else if "ABC" then
(inserting the extra if, as Mark suggests)

and find that "ABC" does not evaluate to "true", and thus nothing will happen. What you need is something like:

if myVariable = "XYZ"  then
   click at the loc of btn "StartXYZ"
else if myVariable = "ABC" then
   click at the loc of btn "StartShani"
end if

-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig


On Apr 22, 2010, at 12:06 PM, Mark Schonewille wrote:

Shani,

else "ABC"  then

should be

else if "ABC" then

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer

We have updated TwistAWord. Download TwistAWord 1.1 at http://www.twistaword.net

Op 22 apr 2010, om 18:04 heeft Shani het volgende geschreven:

If then else statement is not working.







write "XYZ"  & return to socket tSocket




if "XYZ"  then




click at the loc of btn "StartXYZ"




else "ABC"  then




click at the loc of btn "StartShani"




end if

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to