Jump to content

Recommended Posts

Posted (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 by spierce7

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
×
×
  • Create New...