TheOnlyOne Posted November 7, 2008 Posted November 7, 2008 (edited) i need help to use hotkeys to stop my script (that can i do) but i need to get it starting whit a hotkey to do after that? my code expandcollapse popupHotKeySet("{NUMPAD0}","ter") hotkeyset("{NUMPAD1}","pause") HotKeySet("{NUMPAD2}","pausestop") $1=PixelGetColor (907, 320) $2=PixelGetColor (907, 435) $3=PixelGetColor (906, 555) $4=MouseGetPos () msgbox (0,"","") do MouseClick ("left",385, 788,1,20) sleep (1000) mouseclick ("left",544, 529,1,20) sleep (1500) mouseclick ("left",577, 517,1,20) sleep (5500) mouseclick ("left",602, 592,1,20) mouseclick ("left",602, 592,1,20) sleep (2500) mouseclick ("left",463, 785,1,1) mouseclick ("left",544, 529,1,20) sleep (1500) mouseclick ("left",577, 517,1,20) sleep (5500) mouseclick ("left",602, 592,1,20) sleep (500) mouseclick ("left",602, 592,1,20) sleep (2500) if $1 = 0x674731 then Exit if $2 = 0x674731 then exit if $3= 0x674731 then Exit until run ("jsjs.exe") Func Ter() Exit 0 EndFunc func pause() Do sleep (1000) until; its here where i need to click agian to start the script but how ? EndFunc Edited November 7, 2008 by TheOnlyOne
oMBRa Posted November 7, 2008 Posted November 7, 2008 (edited) try this: expandcollapse popupHotKeySet("{NUMPAD0}","ter") Hotkeyset("{NUMPAD1}","pause") Global $Idle = False $1=PixelGetColor (907, 320) $2=PixelGetColor (907, 435) $3=PixelGetColor (906, 555) $4=MouseGetPos () msgbox (0,"","") do MouseClick ("left",385, 788,1,20) sleep (1000) mouseclick ("left",544, 529,1,20) sleep (1500) mouseclick ("left",577, 517,1,20) sleep (5500) mouseclick ("left",602, 592,1,20) mouseclick ("left",602, 592,1,20) sleep (2500) mouseclick ("left",463, 785,1,1) mouseclick ("left",544, 529,1,20) sleep (1500) mouseclick ("left",577, 517,1,20) sleep (5500) mouseclick ("left",602, 592,1,20) sleep (500) mouseclick ("left",602, 592,1,20) sleep (2500) if $1 = 0x674731 then Exit if $2 = 0x674731 then exit if $3= 0x674731 then Exit until run ("jsjs.exe") Func Ter() Exit 0 EndFunc func pause() $Idle = Not $Idle Do If $Idle = True then sleep (100) EndIf until $Idle = False; its here where i need to click agian to start the script but how ? EndFunc Edited November 7, 2008 by oMBra
TheOnlyOne Posted November 7, 2008 Author Posted November 7, 2008 try this: expandcollapse popupHotKeySet("{NUMPAD0}","ter") Hotkeyset("{NUMPAD1}","pause") Global $Idle = False $1=PixelGetColor (907, 320) $2=PixelGetColor (907, 435) $3=PixelGetColor (906, 555) $4=MouseGetPos () msgbox (0,"","") do MouseClick ("left",385, 788,1,20) sleep (1000) mouseclick ("left",544, 529,1,20) sleep (1500) mouseclick ("left",577, 517,1,20) sleep (5500) mouseclick ("left",602, 592,1,20) mouseclick ("left",602, 592,1,20) sleep (2500) mouseclick ("left",463, 785,1,1) mouseclick ("left",544, 529,1,20) sleep (1500) mouseclick ("left",577, 517,1,20) sleep (5500) mouseclick ("left",602, 592,1,20) sleep (500) mouseclick ("left",602, 592,1,20) sleep (2500) if $1 = 0x674731 then Exit if $2 = 0x674731 then exit if $3= 0x674731 then Exit until run ("jsjs.exe") Func Ter() Exit 0 EndFunc func pause() $Idle = Not $Idle Do If $Idle = True then sleep (100) EndIf until $Idle = False; its here where i need to click agian to start the script but how ? EndFuncthank you that helped me
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