Jump to content

Recommended Posts

Posted (edited)

I observed 2 misbehaviours. Is the issue my understanding or AutoIT itself?

My script is supposed to sleep until 1 of 2 desired colours is seen.

While(PixelGetColor(260, 975) <> 39922 Or PixelGetColor(260, 975) <> 41714)
    Sleep(500)
WEnd

The above should sleep if colour1 is true and colour2 is false? Mine didn't sleep. (I guess Or moves left->right until first pass is seen)

While(PixelGetColor(260, 975) <> 39922 And PixelGetColor(260, 975) <> 41714)
    Sleep(500)
WEnd

The above should sleep if both colours are false? Mine didn't sleep if colour2 was true. (Note this is the code I currently use but don't understand why it's failing).

Edited by IAMK

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
  • Recently Browsing   0 members

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