Sign in to follow this  
Followers 0
Falling

Another Simple Questions

2 posts in this topic

What is the syntax for OR.

Like while ( X OR Y)

Thanks in advance.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

$x=1
while $x=0 OR $x=1
tooltip("while works",0,0)
$x=msgbox(1,"OK is 1","Cancel is 2"&@lf&"$x is now "&$x)
wend

msgbox(1,"$x is now 2","exiting")

make sure to have a complete yes or no equasion on each side of an AND or an OR statement

good:

If 1=1 or 2=2 then

If $x=1 or $x=2 then

bad:

If $x=1 or 2 then; bad

If 1=2 or 2 then ; would calculate like If 2 then

ps, I like to keep AND and OR in caps

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0