AutoHotkey Hotkey Scripts Toggleable hotkeys


Example

Following script enters predefined strings on hotkey presses if the scroll lock is active. This can be useful if you often paste a number of repeating strings. Included hotkey for script refresh (for example if you need to edit paste-able strings).

; refresh script hotkey
Numpad9:: 
    GetKeyState, state, ScrollLock, T
    if ( state = "D" )
        Reload
Return

Numpad1:: 
    GetKeyState, state, ScrollLock, T
    if ( state = "D" )
        Send,         Hello 
Return

Numpad2:: 
    GetKeyState, state, ScrollLock, T
    if ( state = "D" )
        Send,         World
Return
;...