Jump to content

hotkey with single function


Go to solution Solved by JohnOne,

Recommended Posts

Posted (edited)

;#work in progress.
;~ #RequireAdmin
Global $Macro = False

HotKeySet("{SPACE}", "SpaceMacro")


While 1
    Sleep(100)
WEnd

Func SpaceMacro()
    $Macro = Not $Macro
    While $Macro
        Send("{SPACE}")
        Sleep(250)
        ConsoleWrite("WORK")
    WEnd
    ConsoleWrite("TEST")
EndFunc

i am trying to make that hotkey (SPACE) to call the function and keep running while loop , and when space pressed again stop the loop. but it just runs it one time thats that. what am i doing wrong? 

I know the forum rules, no hacks , cheats. but this isnt hack. keyboard macro are allowed in games. this is exactly what itll be . keyboard macro to save my spacebar

Edited by taurus

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...