The block following a double-colon hotkey is implicitly the body of a function, but that is only important when you define your own variables. The opening brace can also be written on the same line as the hotkey, after. WinActivate Activate the window found above If multiple lines are required, use braces to mark the start and end of the hotkey's action. To learn how to try it out, refer to How to Run Example Code.įor more about running programs, see How to Run Programs. This example defines a hotkey that runs Notepad whenever you press Win+ N. The most common way to define a hotkey is to write the hotkey name followed by double-colon, then the action: #n::Run "notepad" AutoHotkey has the power to define hotkeys that can be used anywhere or only within specific apps, performing any action that you are able to express with code. For example, Win+ E normally launches File Explorer, and F1 often activates an app-specific help function. How to Write Hotkeys | AutoHotkey v2 How to Write HotkeysĪ hotkey is a key or key combination that triggers an action.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |