Add padding to a string with SubStr or Format. Note that with SubStr, you have to have as many characters as you want to pad with written in the code.
Use SubStr to remove separators from the beginning of a string
Use a NumGet on your associative array to get item count (I learned this from Coco who learned it from Lex)
Use InStr to see if a string starts with a sub string. (Alternatively, SubStr can be used, but it requires the length of the substring)
Make a function call itself on script start (Useful for init functions). Note this can also work with classes
Static Dummy := MyFunction()
MsgBox, I see you %A_UserName%
Do a toggle with only one line.
Start your scripts on login by placing shortcuts (or the actual scripts) in the Startup folder.
FileCreateShortcut, %A_ScriptFullPath%, %A_Startup%\%A_ScriptName%.lnk
Lock your screen with a simple DllCall
Use SetTimer to spawn a new pseudo thread (Warning: These are not real threads)
Put hotkeys in an include without interrupting the AutoExecute section by wrapping them in
Change the default script template by modifying
Run, *RunAs notepad.exe C:\Windows\ShellNew\Template.ahk
Define your objects with more JSON-like formatting by putting your expression into a continuation section
( LTrim Join
"title": "example glossary",
"GlossTerm": "Standard Generalized Markup Language",
"Abbrev": "ISO 8879:1986",
"para": "A meta-markup language, used to create markup languages such as DocBook.",
"GlossSeeAlso": ["GML", "XML"]
Do console output (not standard output) with
DllCalland file io. Note: this doesn't work when running from SciTE4AHK.
FileAppend, %A_Index%`n, CONOUT$
; Alternately, FileOpen("CONOUT", "w").Write(A_Index "`n")
See post revision history on GitHub