AutoUser Posted May 7, 2005 Share Posted May 7, 2005 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. Link to comment Share on other sites More sharing options...
CyberSlug Posted May 8, 2005 Share Posted May 8, 2005 16777215 is not yellow; it's pure white (0xFFFFFF). You might want 16776960 (which is equivalent to 0xFFFF00 in RGB Hex notation). Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
AutoUser Posted May 8, 2005 Author Share Posted May 8, 2005 Wow. All of this time spent with the wrong color. LOL!!!! Thank you so much! Link to comment Share on other sites More sharing options...
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