Xav Posted March 29, 2008 Posted March 29, 2008 (edited) How can the script exit only when he found the color and after it sent Exit and .... ?? THANKS! HotKeySet ("{PAUSE}","Chicken") HotKeySet ("{ESC}","ExitP") While 1 Sleep(1) Wend Func Chicken() While 1 $Coord = PixelSearch( 742, 32,792,146, 0x8C4810 ) If not @error Then Send("{SPACE}") Send ("{Esc}") MouseClick("left" ,393, 292 ,1 ,0) Sleep(100) ExitLoop;----+> it exit when i send Pause hotkey! EndIf Wend EndFunc Func ExitP() Exit EndFunc Edited March 29, 2008 by Xav
daslick Posted March 29, 2008 Posted March 29, 2008 I don't quite understand what your trying to get... Could the problem be that you are sending a {Esc}, and that it is the hotkey to exit? Please explain what the program is supposed to do better if that isn't the problem.
cppman Posted March 29, 2008 Posted March 29, 2008 Maybe this? HotKeySet ("{PAUSE}","Chicken") HotKeySet ("{ESC}","ExitP") While 1 Sleep(1) Wend Func Chicken() $Coord = PixelSearch( 742, 32,792,146, 0x8C4810 ) While (@error) $Coord = PixelSearch(742, 32, 792, 146, 0x8C4810) Wend Send("{SPACE}") Send ("{Esc}") MouseClick("left" ,393, 292 ,1 ,0) Sleep(100) EndFunc Func ExitP() Exit EndFunc Miva OS Project
Xav Posted March 29, 2008 Author Posted March 29, 2008 Maybe this? HotKeySet ("{PAUSE}","Chicken") HotKeySet ("{ESC}","ExitP") While 1 Sleep(1) Wend Func Chicken() $Coord = PixelSearch( 742, 32,792,146, 0x8C4810 ) While (@error) $Coord = PixelSearch(742, 32, 792, 146, 0x8C4810) Wend Send("{SPACE}") Send ("{Esc}") MouseClick("left" ,393, 292 ,1 ,0) Sleep(100) EndFunc Func ExitP() Exit EndFunc Yes sir Thanks !
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