fireblazehu Posted April 16, 2009 Share Posted April 16, 2009 I need help on making a simple script that do the following : press a key check if a certain pixel color on the screen appear, if it does, wait like 10 sec and repeat if it not wait 2 sec and press backspace press the original key aggain and repeat can anyone help? thanks. Far as i can go is get it to press the key and repeat, i dont know how to work the pixel color part =( Link to comment Share on other sites More sharing options...
qazwsx Posted April 16, 2009 Share Posted April 16, 2009 pixelsearch Link to comment Share on other sites More sharing options...
fireblazehu Posted April 16, 2009 Author Share Posted April 16, 2009 pixelsearchCan you be more specific? =/ I dont know what that is Link to comment Share on other sites More sharing options...
Hawkwing Posted April 16, 2009 Share Posted April 16, 2009 (edited) Welcome to the forum! It would be easiest to use pixelchecksum, which checks if any pixels in a region have changed. If that works, you could use something like this: I commented it for you, since your new. $checksumregion = PixelChecksum(left, top, right, bottom) ; left top right and bottom define the area that it checks While 1; infinite loop Send("key") Sleep(1000); the sleep function uses milliseconds If $checksumregion <> PixelChecksum(left, top, right, bottom) Then; checks if the region has changed Sleep(10000); if it has, it waits 10 seconds Else Sleep(2000); else it waits 2 seconds Send("{backspace}"); and sends backspace EndIf WEnd pixelsearch would work too, but you would have to know the exact coordinates of the pixel. The helpfile is a great resource. Edited April 16, 2009 by pigeek The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. 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