Jump to content
Sign in to follow this  
Xav

Sleep with hotkey

Recommended Posts

Xav

how it can sleep 6 sec after each sendet(1)

PS:: ONLY IF HE PRESS 1! If it dont continu to check more :D

Like he press 1 and stop for 6 sec?

Thanks for any help!

Never mind i just found xDDDDDDDDDDDDD

If @error Then

Send("1")

sleep(6000)

EndIf

; HotKey
HotKeySet ("{PAUSE}","Poting")
HotKeySet ("{ESC}","ExitP")

; Code

While 1
    Sleep (1)
    WEnd

Func Poting()
    While 1
$Color = PixelGetColor(76, 558)
$Coord = PixelSearch( 40, 547, 110, 565, 0x5C0000 )

If @error Then
    Send("1")
    
EndIf
    WEnd
EndFunc

Func ExitP()
Exit
EndFunc
Edited by Xav

Share this post


Link to post
Share on other sites
FreeFry

One alternative to using Sleep() is using Timers(TimerInit() and TimerDiff()), but in your case using just Sleep() will probably work just as well. :D

Edited by FreeFry

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×