Jump to content
Sign in to follow this  
Rahab

Auto Keying?

Recommended Posts

Rahab

So I am trying to create a macro that constantly press F5 while the window TwelveSky is active and also one that doesn't start till rge Home Key is pressed and pauses and unpauses when teh pause key is press and Exits when ESC is press. The method I tried had no succes so is it possible for someone to help me with this.

Thank You,

Rahab

Share this post


Link to post
Share on other sites
Andreik

HotKeySet("{HOME}","Start") ;Press HOME key to start
HotKeySet("{PAUSE}","Pause") ;Press Pause key to pause/continue script
HotKeySet("{ESC}","Quit") ;Press ESC key to exit

Global $PAUSE = False

While True
    Sleep(20)
WEnd

Func Start()
    While WinExists("TwelveSky ")
        Send("{F5}")
        Sleep(20)
    WEnd
EndFunc

Func Pause()
    $PAUSE = Not $PAUSE
    Do
        TrayTip("PAUSE",$PAUSE,1)
        Sleep(20)
    Until Not $PAUSE
EndFunc

Func Quit()
    Exit
EndFunc


When the words fail... music speaks

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.