Jump to content

While experssions


Shibuya
 Share

Recommended Posts

Hi peeps,

I jus started with AutoIt not too long ago and have some problems with the use of its expressions.

I'm too used to Visual Basic and Java, so my expression here is one example:

While @error != 1 or -1
...........

where '!=' is actually 'NOT equal'

I found that AutoIt don't use exclaimation mark for NOT, so how should I rewrite the above to AutoIt?

I'm now trying this:

While @error Not -1 Or Not 1
.....

Is this correct?

Edited by Shibuya

The speed of sound is defined by the distance from door to computer divided by the time interval needed to close the media player and pull up your pants when your mom shouts "OH MY GOD WHAT ARE YOU DOING!!!"

Link to comment
Share on other sites

; while the error code is neither 1 nor -1
 while not(@error = 1 or @error = -1)
; or while the error code doesn't equal 1 and while the error code doesn't equal -1
; (I could swear that VB uses the <> operator too)
 while @error <> 1 and @error <> -1

Edit: Further clarification.

Edit: This may or may not fit your needs depending on what you're doing:

; while there's no error
 while not(@error)
Edited by LxP
Link to comment
Share on other sites

while not(@error = 1 or @error = -1)
; or
 while @error <> 1 and @error <> -1

Edit: This may or may not fit your needs depending on what you're doing:

; while there's no error
 while not(@error)
That was fast!!

Thanks!!

;)

The speed of sound is defined by the distance from door to computer divided by the time interval needed to close the media player and pull up your pants when your mom shouts "OH MY GOD WHAT ARE YOU DOING!!!"

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...