powderedonuts Posted December 25, 2007 Posted December 25, 2007 If Hex(PixelGetColor( 90, 142 ), 6) <> "007400" Then ; (WHAT HERE? to restart the script from the beginning) End If I want to add this a bunch of times into my script so that if the pixel is no longer green The loop restarts instead of doing the whole thing. 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(144 ) 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 Please help, thanks. I want a command that checks the pixels between movements with the sleeps that will interrupt the process and restart the loop.
herewasplato Posted December 25, 2007 Posted December 25, 2007 ContinueLoop [size="1"][font="Arial"].[u].[/u][/font][/size]
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