Math2 Posted December 29, 2011 Posted December 29, 2011 (edited) While 1 Sleep(15) $coord1 = PixelSearch(300, 641, 345, 685, 16777215, 0) If IsArray($coord1) = True Then Send("{a}") Send("{a down}") EndIfThis color is White, then what I want is when the screen appear all white(sometime happen), the code has to cancel the func up. How ? Edited December 29, 2011 by Math2
JohnOne Posted December 29, 2011 Posted December 29, 2011 (edited) get a pixelchecksum of the whole white screen (use the optional step parameter for speed) check also for that checksum in the loop, and return from function if true. Edited December 29, 2011 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Math2 Posted December 29, 2011 Author Posted December 29, 2011 And with this, is possible to come back the Func ? Because the white screen is so fast, then after it appear, I want the func working, again.
JohnOne Posted December 29, 2011 Posted December 29, 2011 Yes, of course. But it seems to me you should complete the first step first. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Math2 Posted December 29, 2011 Author Posted December 29, 2011 It is many code for me begginer. I think in a possibility of put an hotkey to stop the program and when the Checksum find the screen, it send the stop key sleep some time the come back the func send the key again. Do you agree with me ?
JohnOne Posted December 29, 2011 Posted December 29, 2011 I agree that is the best way because you thought of it yourself. But I would advise you look at AdLibRegister() before using hotkeysThat function will run a function every 250 milliseconds (default) that could be your function to test for the white screen.I do not agree that it is "many code for you beginner". AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Math2 Posted December 29, 2011 Author Posted December 29, 2011 Then, If I use hotkey, Should I use Pixelchecksum or PixelSearch ? I think that have to be this way $Protection = PixelChecksum(bla, bla, bla, bla, 16777215, 0) If IsArray($Protection) = True Then Send("{hotkey}") sleep(250) Send("{hotkey up}") EndIf What do you think ?
JohnOne Posted December 29, 2011 Posted December 29, 2011 What do you think ?I think you should have the helpfile open, and referring to every function you attempt to use, every step of the wayon every parameter. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Math2 Posted December 29, 2011 Author Posted December 29, 2011 (edited) Sorry, but I can do manually but automatically it is difficulty because the things that I am sending keys are white, and all the screen be white, then the program send the key in the wrong time. Edited December 29, 2011 by Math2
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