wimhek Posted August 11, 2007 Posted August 11, 2007 In my script I want to code If condition a and condition b do something Is this possible in Autoit ?
Generator Posted August 11, 2007 Posted August 11, 2007 (edited) If $A and $B Then Else EndIf Edit: Give more detail about your condition. Edited August 11, 2007 by Generator
narayanjr Posted August 11, 2007 Posted August 11, 2007 If $Thing1 = $Right And $Thing2 = $Right2 Then ;Stuff you want to do if both are right EndIf That what you mean?
spierce7 Posted August 11, 2007 Posted August 11, 2007 (edited) In my script I want to code If condition a and condition b do something Is this possible in Autoit ? The above methods are valid methods, or another way you could do it, is using something called nested loops. If condition a Then If condition b Then do something EndIf EndIf This way is however probably what most people would consider the stupid way to do it. It's much easier to use the previously posted methods, that use the 'And' statement, which checks to see if both conditions are true. Another statement that is common is the 'Or' statement which checks to see if one or the other conditions is true. For instance: If condition a And condition b Then do something EndIf hope this helps bro. Edited August 11, 2007 by spierce7
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now