These are circa three hundred, ready-to-use hotstrings for expanding AHK's built-in functions, commands and directives. Also try this nice script by boiler: Insert AHK Command/Function Parameters (with Search/Auto-Complete).
Download
How to use
Type a function/command and press tab to expand its parameters,
Preview Demo 1, expanding parameters
Some commands and functions can be called in more than one way, these parameters can be cycled with tab, eg,
Preview Cycling multiple parameters.
I reccomend making all hotstrings context sensitive for your editor, eg
Code: Select all
#IfWinActive, ahk_exe notepad++.exe
- Very limited testing.
- AutoGUI users will have more luck using Insert AHK Command/Function Parameters (with Search/Auto-Complete) by boiler. Edit: AutoGUI has similar built-in features, see this comment.
- To enable the cycling, #InputLevel,1 is used for the hotstrings.
- May lack some relevant hotstrings.
- May contain some irrelevant hotstrings.
- I choose not to expand output variables.
- Hotstring option ? is not present on functions that should follow an object-dot, eg, File.RawRead(...). This might be changed. You are welcome to do it for me
Code: Select all
:OB0:StrSplit::(String [, Delimiters, OmitChars])
:OB0:StrReplace::(Haystack, SearchText [, ReplaceText, OutputVarCount, Limit := -1])
All credit goes to forum member jeeswg for generating this list which I have reduced to this,
Code: Select all
Number := Asc(String)
AutoTrim, On|Off
BlockInput, Mode
Break [, LoopLabel]
String := Chr(Number)
ClipWait [, SecondsToWait, 1]
ComObject := ComObjActive(CLSID)
ParamObj := ComObject(VarType, Value [, Flags])
ParamObj := ComObjMissing()
ComObject := ComObjEnwrap(DispPtr)
DispPtr := ComObjUnwrap(ComObject)
ArrayObj := ComObjArray(VarType, Count1 [, Count2, ... Count8])
ComObjConnect(ComObject [, Prefix])
ComObject := ComObjCreate(CLSID [, IID])
Enabled := ComObjError([Enable])
Flags := ComObjFlags(ComObject [, NewFlags, Mask])
ComObject := ComObjGet(Name)
InterfacePointer := ComObjQuery(ComObject, [SID,] IID)
VarType := ComObjType(ComObject)
Name := ComObjType(ComObject, "Name")
IID := ComObjType(ComObject, "IID")
Value := ComObjValue(ComObject)
Continue [, LoopLabel]
Control, Cmd [, Value, Control, WinTitle, WinText, ExcludeTitle, ExcludeText]
ControlClick [, Control-or-Pos, WinTitle, WinText, WhichButton, ClickCount, Options, ExcludeTitle, ExcludeText]
ControlFocus [, Control, WinTitle, WinText, ExcludeTitle, ExcludeText]
ControlGet, OutputVar, Cmd [, Value, Control, WinTitle, WinText, ExcludeTitle, ExcludeText]
ControlGetFocus, OutputVar [, WinTitle, WinText, ExcludeTitle, ExcludeText]
ControlGetPos [, X, Y, Width, Height, Control, WinTitle, WinText, ExcludeTitle, ExcludeText]
ControlGetText, OutputVar [, Control, WinTitle, WinText, ExcludeTitle, ExcludeText]
ControlMove, Control, X, Y, Width, Height [, WinTitle, WinText, ExcludeTitle, ExcludeText]
ControlSend [, Control, Keys, WinTitle, WinText, ExcludeTitle, ExcludeText]
ControlSendRaw: Same parameters as above.
ControlSetText [, Control, NewText, WinTitle, WinText, ExcludeTitle, ExcludeText]
CoordMode, ToolTip|Pixel|Mouse|Caret|Menu [, Screen|Window|Client]
Critical [, Off]
Critical 50 ; See bottom of remarks.
DetectHiddenText, On|Off
DetectHiddenWindows, On|Off
Result := DllCall("[DllFile\]Function" [, Type1, Arg1, Type2, Arg2, "Cdecl ReturnType"])
Drive, Sub-command [, Drive , Value]
DriveGet, OutputVar, Cmd [, Value]
DriveSpaceFree, OutputVar, Path
Edit
Else
EnvAdd, Var, Value [, TimeUnits]
EnvDiv, Var, Value
EnvGet, OutputVar, EnvVarName
EnvMult, Var, Value
EnvSet, EnvVar, Value
EnvSub, Var, Value [, TimeUnits]
EnvUpdate
Exit [, ExitCode]
ExitApp [, ExitCode]
FileAppend [, Text, Filename, Encoding]
FileCopy, SourcePattern, DestPattern [, Flag]
FileCopyDir, Source, Dest [, Flag]
FileCreateDir, DirName
FileCreateShortcut, Target, LinkFile [, WorkingDir, Args, Description, IconFile, ShortcutKey, IconNumber, RunState]
FileDelete, FilePattern
FileEncoding [, Encoding]
AttributeString := FileExist(FilePattern)
FileGetAttrib, OutputVar [, Filename]
AttributeString := FileExist(FilePattern)
FileGetShortcut, LinkFile [, OutTarget, OutDir, OutArgs, OutDescription, OutIcon, OutIconNum, OutRunState]
FileGetSize, OutputVar [, Filename, Units]
FileGetTime, OutputVar [, Filename, WhichTime]
FileGetVersion, OutputVar [, Filename]
FileInstall, Source, Dest [, Flag]
FileMove, SourcePattern, DestPattern [, Flag]
FileMoveDir, Source, Dest [, Flag]
file := FileOpen(Filename, Flags [, Encoding])
FileRead, OutputVar, Filename
FileReadLine, OutputVar, Filename, LineNum
FileRecycle, FilePattern
FileRecycleEmpty [, DriveLetter]
FileRemoveDir, DirName [, Recurse?]
FileSelectFile, OutputVar [, Options, RootDir\Filename, Prompt, Filter]
FileSelectFolder, OutputVar [, StartingFolder, Options, Prompt]
FileSetAttrib, Attributes [, FilePattern, OperateOnFolders?, Recurse?]
FileSetTime [, YYYYMMDDHH24MISS, FilePattern, WhichTime, OperateOnFolders?, Recurse?]
Finally Statement
For Key [, Value] in Expression
String := Format(FormatStr [, Values...])
Flags Width .Precision ULT Type
FormatTime, OutputVar [, YYYYMMDDHH24MISS, Format]
FunctionReference := Func(FunctionName)
String := GetKeyName(Key)
Number := GetKeyVK(Key)
Number := GetKeySC(Key)
GetKeyState, OutputVar, KeyName [, Mode]
KeyIsDown := GetKeyState("KeyName" [, "Mode"])
Gosub, Label
Goto, Label
GroupActivate, GroupName [, R]
GroupAdd, GroupName [, WinTitle, WinText, Label, ExcludeTitle, ExcludeText]
GroupClose, GroupName [, A|R]
GroupDeactivate, GroupName [, R]
Gui, sub-command [, Param2, Param3, Param4]
CtrlEvent(CtrlHwnd, GuiEvent, EventInfo, ErrorLevel:="")
GuiSize(GuiHwnd, EventInfo, Width, Height)
GuiContextMenu(GuiHwnd, CtrlHwnd, EventInfo, IsRightClick, X, Y)
GuiControl, Sub-command, ControlID [, Param3]
GuiControlGet, OutputVar [, Sub-command, ControlID, Param4]
Hotkey, KeyName [, Label, Options]
Hotkey, IfWinActive/Exist [, WinTitle, WinText]
Hotkey, If [, Expression]
if Var between LowerBound and UpperBound
if Var not between LowerBound and UpperBound
IfEqual, var, value
IfNotEqual, var, value
IfGreater, var, value
IfGreaterOrEqual, var, value
IfLess, var, value
IfLessOrEqual, var, value
If var ; If var's contents are blank or 0, it is considered false. Otherwise, it is true.
IfExist, FilePattern
IfNotExist, FilePattern
AttributeString := FileExist(FilePattern)
if (expression)
if Var in MatchList
if Var not in MatchList
if Var contains MatchList
if Var not contains MatchList
IfInString, var, SearchString
IfNotInString, var, SearchString
Position := InStr(Haystack, Needle [, CaseSensitive?, StartingPos]]) ; See the InStr() function for details.
if var is type
if var is not type
IfMsgBox, ButtonName
ImageSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ImageFile
IniDelete, Filename, Section [, Key]
IniRead, OutputVar, Filename, Section, Key [, Default]
IniRead, OutputVarSection, Filename, Section
IniRead, OutputVarSectionNames, Filename
IniWrite, Value, Filename, Section, Key
IniWrite, Pairs, Filename, Section
Input [, OutputVar, Options, EndKeys, MatchList]
InputBox, OutputVar [, Title, Prompt, HIDE, Width, Height, X, Y, Font, Timeout, Default]
FoundPos := InStr(Haystack, Needle [, CaseSensitive = false, StartingPos = 1, Occurrence = 1])
TrueOrFalse := IsByRef(UnquotedVarName)
MinParamsPlus1 := IsFunc(FunctionName)
TrueOrFalse := IsLabel(LabelName)
TrueOrFalse := IsObject(ObjectValue)
KeyHistory
KeyWait, KeyName [, Options]
ListHotkeys
ListLines [, On|Off]
ListVars
Handle := LoadPicture(Filename [, Options, ByRef ImageType])
Loop [, Count]
Loop, Files, FilePattern [, Mode]
Loop, FilePattern [, IncludeFolders?, Recurse?]
Loop, Parse, InputVar [, Delimiters, OmitChars]
Loop, Read, InputFile [, OutputFile]
Loop, Reg, RootKey[\Key, Mode]
Loop, RootKey [, Key, IncludeSubkeys?, Recurse?]
Value := Abs(Number)
Value := Ceil(Number)
Value := Exp(N)
Value := Floor(Number)
Value := Log(Number)
Value := Ln(Number)
Value := Mod(Dividend, Divisor)
Value := Round(Number [, N])
Value := Sqrt(Number)
Value := Sin(Number)
Value := Cos(Number)
Value := Tan(Number)
Value := ASin(Number)
Value := ACos(Number)
Value := ATan(Number)
Menu, MenuName, Cmd [, P3, P4, P5]
Handle := MenuGetHandle(MenuName)
MenuName := MenuGetName(Handle)
MouseClick [, WhichButton , X, Y, ClickCount, Speed, D|U, R]
MouseClickDrag, WhichButton, X1, Y1, X2, Y2 [, Speed, R]
MouseGetPos, [OutputVarX, OutputVarY, OutputVarWin, OutputVarControl, 1|2|3]
MouseMove, X, Y [, Speed, R]
MsgBox, Text
MsgBox [, Options, Title, Text, Timeout]
Number := NumGet(VarOrAddress [, Offset = 0][, Type = "UPtr"])
NumPut(Number, VarOrAddress [, Offset = 0][, Type = "UPtr"])
ObjAddRef(Ptr)
ObjRelease(Ptr)
BoundFunc := ObjBindMethod(Obj, Method, Params)
OnClipboardChange(Func [, AddRemove])
OnExit [, Label]
OnExit(Func [, AddRemove]) ; Requires [v1.1.20+]
ExitFunc(ExitReason, ExitCode)
OnMessage(MsgNumber [, Function, MaxThreads])
Name := OnMessage(MsgNumber, "FunctionName")
Name := OnMessage(MsgNumber, "")
Name := OnMessage(MsgNumber)
OnMessage(MsgNumber, FuncObj) ; Option 1
OnMessage(MsgNumber, FuncObj, 1) ; Option 2 (MaxThreads = 1)
OnMessage(MsgNumber, FuncObj, -1)
OnMessage(MsgNumber, FuncObj, 0)
Number := Ord(String)
OutputDebug, Text
Pause [, On|Off|Toggle, OperateOnUnderlyingThread?]
PixelGetColor, OutputVar, X, Y [, Alt|Slow|RGB]
PixelSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ColorID [, Variation, Fast|RGB]
PostMessage, Msg [, wParam, lParam, Control, WinTitle, WinText, ExcludeTitle, ExcludeText]
SendMessage, Msg [, wParam, lParam, Control, WinTitle, WinText, ExcludeTitle, ExcludeText, Timeout]
Process, Cmd [, PID-or-Name, Param3]
SplashImage, Off
SplashImage [, ImageFile, Options, SubText, MainText, WinTitle, FontName]
Progress, Off
Progress, ProgressParam1 [, SubText, MainText, WinTitle, FontName]
Random, OutputVar [, Min, Max]
Random, , NewSeed
RegDelete, RootKey\SubKey [, ValueName] ; v1.1.21+
RegDelete, RootKey, SubKey [, ValueName]
FoundPos := RegExMatch(Haystack, NeedleRegEx [, UnquotedOutputVar = "", StartingPosition = 1])
NewStr := RegExReplace(Haystack, NeedleRegEx [, Replacement = "", OutputVarCount = "", Limit = -1, StartingPosition = 1])
Address := RegisterCallback("FunctionName" [, Options = "", ParamCount = FormalCount, EventInfo = Address])
RegRead, OutputVar, RootKey\SubKey [, ValueName] ; v1.1.21+
RegRead, OutputVar, RootKey, SubKey [, ValueName]
RegWrite, ValueType, RootKey\SubKey [, ValueName, Value] ; v1.1.21+
RegWrite, ValueType, RootKey, SubKey [, ValueName, Value]
Reload
Return [, Expression]
FileRead, OutputVar, *Pnnn Filename
Run, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]
RunWait, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]
RunAs [, User, Password, Domain]
Send Keys
SendRaw Keys
SendInput Keys
SendPlay Keys
SendEvent Keys
SendLevel, Level
SendMode Input|Play|Event|InputThenPlay
SetBatchLines, 20ms
SetBatchLines, LineCount
SetControlDelay, Delay
SetDefaultMouseSpeed, Speed
SetEnv, Var, Value
SetFormat, NumberType, Format
SetKeyDelay [, Delay, PressDuration, Play]
SetMouseDelay, Delay [, Play]
SetCapsLockState [, State]
SetNumLockState [, State]
SetScrollLockState [, State]
SetRegView, RegView
SetStoreCapslockMode, On|Off
SetTimer [, Label, Period|On|Off|Delete, Priority]
SetTitleMatchMode, MatchMode
SetTitleMatchMode, Fast|Slow
SetWinDelay, Delay
SetWorkingDir, DirName
Shutdown, Code
Sleep, DelayInMilliseconds
Sort, VarName [, Options]
SoundBeep [, Frequency, Duration]
SoundGet, OutputVar [, ComponentType, ControlType, DeviceNumber]
SoundGetWaveVolume, OutputVar [, DeviceNumber]
SoundPlay, Filename [, wait]
SoundSet, NewSetting [, ComponentType, ControlType, DeviceNumber]
SoundSetWaveVolume, Percent [, DeviceNumber]
SplashTextOff
SplashTextOn [, Width, Height, Title, Text]
SplitPath, InputVar [, OutFileName, OutDir, OutExtension, OutNameNoExt, OutDrive]
StatusBarGetText, OutputVar [, Part#, WinTitle, WinText, ExcludeTitle, ExcludeText]
StatusBarWait [, BarText, Seconds, Part#, WinTitle, WinText, Interval, ExcludeTitle, ExcludeText]
StringCaseSense, On|Off|Locale
StringGetPos, OutputVar, InputVar, SearchText [, L#|R#, Offset]
Position := InStr(Haystack, Needle [, CaseSensitive?, StartingPos]) ; See the InStr() function for details.
StringLeft, OutputVar, InputVar, Count
StringRight, OutputVar, InputVar, Count
NewStr := SubStr(String, StartPos [, Length]) ; See the SubStr() function for details.
OutputVar := StrLen(InputVar)
StringLen, OutputVar, InputVar
StringLower, OutputVar, InputVar [, T]
StringUpper, OutputVar, InputVar [, T]
StringMid, OutputVar, InputVar, StartChar [, Count , L]
NewStr := SubStr(String, StartPos [, Length]) ; See the SubStr() function for details.
OutputVar := StrReplace(Haystack, SearchText [, ReplaceText, OutputVarCount, Limit := -1]) ; v1.1.21+
StringReplace, OutputVar, InputVar, SearchText [, ReplaceText, ReplaceAll?]
StringSplit, OutputArray, InputVar [, Delimiters, OmitChars]
Array := StrSplit(String [, Delimiters, OmitChars]) ; [v1.1.13+]
StringTrimLeft, OutputVar, InputVar, Count
StringTrimRight, OutputVar, InputVar, Count
NewStr := SubStr(String, StartPos [, Length]) ; See the SubStr() function for details.
StrPut(String [, Encoding = None ] )
StrPut(String, Address [, Length] [, Encoding = None ] )
StrGet(Address [, Length] [, Encoding = None ] )
NewStr := SubStr(String, StartingPos [, Length])
Suspend [, Mode]
SysGet, OutputVar, Sub-command [, Param3]
Thread, NoTimers [, false]
Thread, Priority, n
Thread, Interrupt [, Duration, LineCount]
Throw [, Expression]
ToolTip [, Text, X, Y, WhichToolTip]
Transform, OutputVar, Cmd, Value1 [, Value2]
TrayTip [, Title, Text, Seconds, Options]
Result := Trim(String, OmitChars = " `t")
Result := LTrim(String, OmitChars = " `t")
Result := RTrim(String, OmitChars = " `t")
UrlDownloadToFile, URL, Filename
GrantedCapacity := VarSetCapacity(UnquotedVarName [, RequestedCapacity, FillByte])
WinActivate [, WinTitle, WinText, ExcludeTitle, ExcludeText]
WinActivateBottom [, WinTitle, WinText, ExcludeTitle, ExcludeText]
IfWinActive [, WinTitle, WinText, ExcludeTitle, ExcludeText]
IfWinNotActive [, WinTitle, WinText, ExcludeTitle, ExcludeText]
UniqueID := WinActive("WinTitle", "WinText", "ExcludeTitle", "ExcludeText")
WinClose [, WinTitle, WinText, SecondsToWait, ExcludeTitle, ExcludeText]
IfWinExist [, WinTitle, WinText, ExcludeTitle, ExcludeText]
IfWinNotExist [, WinTitle, WinText, ExcludeTitle, ExcludeText]
UniqueID := WinExist("WinTitle", "WinText", "ExcludeTitle", "ExcludeText")
WinGet, OutputVar [, Cmd, WinTitle, WinText, ExcludeTitle, ExcludeText]
WinGetActiveStats, Title, Width, Height, X, Y
WinGetActiveTitle, OutputVar
WinGetClass, OutputVar [, WinTitle, WinText, ExcludeTitle, ExcludeText]
WinGetPos [, X, Y, Width, Height, WinTitle, WinText, ExcludeTitle, ExcludeText]
WinGetText, OutputVar [, WinTitle, WinText, ExcludeTitle, ExcludeText]
WinGetTitle, OutputVar [, WinTitle, WinText, ExcludeTitle, ExcludeText]
WinHide [, WinTitle, WinText, ExcludeTitle, ExcludeText]
WinKill [, WinTitle, WinText, SecondsToWait, ExcludeTitle, ExcludeText]
WinMaximize [, WinTitle, WinText, ExcludeTitle, ExcludeText]
WinMenuSelectItem, WinTitle, WinText, Menu [, SubMenu1, SubMenu2, SubMenu3, SubMenu4, SubMenu5, SubMenu6, ExcludeTitle, ExcludeText]
WinMinimize [, WinTitle, WinText, ExcludeTitle, ExcludeText]
WinMinimizeAll
WinMinimizeAllUndo
WinMove, X, Y
WinMove, WinTitle, WinText, X, Y [, Width, Height, ExcludeTitle, ExcludeText]
WinRestore [, WinTitle, WinText, ExcludeTitle, ExcludeText]
WinSet, Attribute, Value [, WinTitle, WinText, ExcludeTitle, ExcludeText]
WinSetTitle, NewTitle
WinSetTitle, WinTitle, WinText, NewTitle [, ExcludeTitle, ExcludeText]
WinShow [, WinTitle, WinText, ExcludeTitle, ExcludeText]
WinWait [, WinTitle, WinText, Seconds, ExcludeTitle, ExcludeText]
WinWaitActive [, WinTitle, WinText, Seconds, ExcludeTitle, ExcludeText]
WinWaitNotActive [, WinTitle, WinText, Seconds, ExcludeTitle, ExcludeText]
WinWaitClose [, WinTitle, WinText, Seconds, ExcludeTitle, ExcludeText]
#AllowSameLineComments
#ClipboardTimeout Milliseconds
#CommentFlag NewString
#ErrorStdOut
#EscapeChar NewChar
#HotkeyInterval Milliseconds
#HotkeyModifierTimeout Milliseconds
#Hotstring NoMouse
#Hotstring EndChars NewChars
#Hotstring NewOptions
#IfTimeout Timeout
#IfWinActive [, WinTitle, WinText]
#IfWinExist [, WinTitle, WinText]
#IfWinNotActive [, WinTitle, WinText]
#IfWinNotExist [, WinTitle, WinText]
#If [, Expression]
#Include FileOrDirName
#Include <LibName>
#IncludeAgain FileOrDirName
#InputLevel [, Level]
#InstallKeybdHook
#InstallMouseHook
#KeyHistory MaxEvents
#MaxHotkeysPerInterval Value
#MaxMem Megabytes
#MaxThreads Value
#MaxThreadsBuffer On|Off
#MaxThreadsPerHotkey Value
#MenuMaskKey KeyName
#NoEnv
#NoTrayIcon
#Persistent
#SingleInstance [force|ignore|off]
#UseHook [On|Off]
#Warn [, WarningType, WarningMode]
#WinActivateForce
HBITMAP:bitmap-handle
HICON:icon-handle
Enum.Next(OutputVar1 [, OutputVar2, ...])
File.Write(String)
Line := File.ReadLine()
File.WriteLine([String])
Num := File.ReadNumType()
File.WriteNumType(Num)
File.RawRead(VarOrAddress, Bytes)
File.RawWrite(VarOrAddress, Bytes)
File.Seek(Distance [, Origin = 0])
File.Position := Distance
File.Pos := Distance
Pos := File.Tell()
Pos := File.Position
Pos := File.Pos
FileSize := File.Length
File.Length := NewSize
IsAtEOF := File.AtEOF
File.Close()
Encoding := File.Encoding
File.Encoding := Encoding
File.__Handle
Func.Call(Parameters) ; v1.1.19+
BoundFunc := Func.Bind(Parameters)
Func.Name
Func.IsBuiltIn
Func.IsVariadic
Func.MinParams
Func.MaxParams
Func.IsByRef(ParamIndex)
Func.IsOptional(ParamIndex)
Object.InsertAt(Pos, Value1 [, Value2, ... ValueN])
Object.RemoveAt(Pos [, Length])
Object.Push([ Value, Value2, ..., ValueN ])
Value := Object.Pop()
MinIndex := Object.MinIndex()
MaxIndex := Object.MaxIndex()
Length := Object.Length()
Object.SetCapacity(MaxItems)
Object.SetCapacity(Key, ByteSize)
MaxItems := Object.GetCapacity()
ByteSize := Object.GetCapacity(Key)
Ptr := Object.GetAddress(Key)
Enum := Object._NewEnum()
Object.HasKey(Key)
Clone := Object.Clone()
ObjRawSet(Object, Key, Value)
Object.Insert(Pos, Value1 [, Value2, ... ValueN ])
Object.Insert(Value)
Object.Insert(StringOrObjectKey, Value)
Object.Remove(FirstKey, LastKey)
Misc
As far as i'm concerned, you may use this in any way and any context you like.
Good luck
Edit: Fixed cycle bug. (Ty Relayer)