Jump to content

Recommended Posts

Posted (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

HotKeySet("{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 by TheOnlyOne
Posted (edited)

try this:

HotKeySet("{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 by oMBra
Posted

try this:

HotKeySet("{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
thank you :mellow: that helped me :(

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...