powderedonuts Posted December 25, 2007 Share Posted December 25, 2007 Here is my looping script that I'm working on that initiates based on the color of a green pixel. What I need to implement now is a way for the script to keep checking the pixel, and if it turns not green it restarts the loop (like if it is partially through the arrow key movements but not fully done). How can I do this? Thanks. expandcollapse popupHotKeySet("{F9}","Start") HotKeySet("{F10}","End") While 1 Sleep(100) WEnd Func Start() While 1 If Hex(PixelGetColor( 90, 142 ), 6) <> "007400" Then; Send("{SPACE}") Sleep(10000) Send("{SPACE}") Sleep(200) Else; Send("{SPACE}") Sleep(2000) Send("{UP down}"); Sleep(1600) Send("{UP up}"); Send("{RIGHT down}"); Sleep(220) Send("{RIGHT up}"); Send("{UP down}"); Sleep(10700) Send("{UP up}"); Sleep(50000 + Random(5000, 6000, 7000)) Send("{SPACE}") Sleep(50000 + Random(5000, 6000, 8000)) Send("{SPACE}") Sleep(10000 + Random(5000, 6000, 8000)) Send("{UP down}"); Sleep(3500) Send("{UP up}"); Sleep(1000) Send("1", 1) Sleep(20000) EndIf Wend EndFunc Func End() Exit EndFunc Link to comment Share on other sites More sharing options...
powderedonuts Posted December 25, 2007 Author Share Posted December 25, 2007 Like can I add a pixel get color function between each movement that will continue the script if the color is green but if the pixel is no longer green restarts the whole thing? 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