Variables have no explicit types
Variables don't need to be declared, but they have to be given a value before you call them
Spaces are ignored except
Line breaks separate statements
Comments are done through semicolon or block comment
with /* */
AHK is object-oriented They behave more-or-less the same as in python
They have 3 behaviours
Modifier keys:
# Windows key
! Alt
^ Ctrl
+ Shift
< Left key of modifier pair
* fire even if extra modifiers are being held down
UP Used to fire when the key is released, rather than pressed
& to combine modifiers
Using & will cause the first term to become a prefix/modifier key, and therefore lose its original function
Numpad0::Send "{Numpad0}"*
modifier by defaultHotkeys are quasi multi-threaded, so you can run multiple hotkey subroutines at the same time
Used to make a hotkey perform actions dependent on conditions
You can force numlock, capslock, etc. to always be on or always off
You can actually map hotkeys to do AltTab and ShiftAltTab, to make nicer combos for changing windows
You can't use #HotIf with AltTab
Can be used to expand abbreviations
in general, they're triggered by strings
::btw::by the way
Hotstring options (go after the first colon, before the second)
* makes it so that you don't need an ending character to activate the hotstring
? hotstring triggered even when in another word
b0 automatic backspacing is not done to erase the hotstring after you type it
c case sensitive
o omit the ending character of the hotstring (allows you to still need to press . or , etc in order to send the hotstring, but it doesn't show up in the text)
X execute a function rather than displaying text