Jump to content

Auto Keying?


Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...