Sign in to follow this  
Followers 0
AutoUser

Stumped

3 posts in this topic

I'm trying to make a simple script that checks to see if a location on the screen is yellow, then, if it is: clicks that location, if it isn't: waits until it is and then clicks the location.

This is what I have:

WinWaitActive("WindowNameHere")



While 1 = 1
    $color = PixelGetColor(388,367)
    if $color= 16777215 Then
        MouseClick("left",388,367,1,0)
    EndIf

WEnd

But for some reason, the program goes into an infinate loop, takes control of the mouse, and clicks consantly even though there is no instance of the designated color in sight.

Does anyone know why this is? Help would be GREATLY appreciated because I've spent hours on this. Thanks.

Share this post


Link to post
Share on other sites



Wow. All of this time spent with the wrong color. LOL!!!! Thank you so much!

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