Alphabetical Function Index

Click on a function name for details. Entries in large font are the most commonly used.

Entry Description
{ ... } (Block) A pair of braces denotes a block. Blocks are typically used with functions, Else, Loop, While-loop, and IF-commands.
{ ... } / Object Creates a scriptable associative array.
[ ... ] / Array Creates a scriptable associative array with integer keys.
Abs Returns the absolute value of Number.
ASin Returns the arcsine (the number whose sine is Number) in radians.
ACos Returns the arccosine (the number whose cosine is Number) in radians.
ATan Returns the arctangent (the number whose tangent is Number) in radians.
BlockInput Disables or enables the user's ability to interact with the computer via keyboard and mouse.
Break Exits (terminates) a loop. Valid inside any kind of loop.
Catch Specifies the code to execute if an exception is raised during execution of a try statement.
Ceil Returns Number rounded up to the nearest integer (without any .00 suffix).
Chr Returns the string (usually a single character) corresponding to the character code indicated by the specified number.
Click Clicks a mouse button at the specified coordinates. It can also hold down a mouse button, turn the mouse wheel, or move the mouse.
ClipWait Waits until the clipboard contains data.
ComObjActive Retrieves a registered COM object.
ComObjArray Creates a SAFEARRAY for use with COM.
ComObjConnect Connects a COM object's event sources to functions with a given prefix.
ComObjCreate Creates a COM object.
ComObject Wraps a value, SafeArray or COM object for use by the script or for passing to a COM method.
ComObjError Enables or disables notification of COM errors.
ComObjFlags Retrieves or changes flags which control a COM wrapper object's behaviour.
ComObjGet Returns a reference to an object provided by a COM component.
ComObjQuery Queries a COM object for an interface or service.
ComObjType Retrieves type information from a COM object.
ComObjValue Retrieves the value or pointer stored in a COM wrapper object.
Continue Skips the rest of the current loop iteration and begins a new one. Valid inside any kind of loop.
ControlAddItem Adds a new entry at the bottom of a ListBox or ComboBox.
ControlChoose Sets the selection in a ListBox or ComboBox to be the Nth entry.
ControlChooseString Sets the selection in a ListBox or ComboBox to be the first entry whose leading part matches a string.
ControlClick Sends a mouse button or mouse wheel event to a control.
ControlDeleteItem Deletes the Nth entry from a ListBox or ComboBox.
ControlEditPaste Pastes a string at the caret/insert position in an Edit control.
ControlFindItem Returns the entry number of a ListBox or ComboBox given the entry's text.
ControlFocus Sets input focus to a given control on a window.
ControlGetChecked Returns 1 (true) if the checkbox or radio button is checked or 0 (false) if not.
ControlGetChoice Returns the name of the currently selected entry in a ListBox or ComboBox.
ControlGetCurrentCol Returns the column number in an Edit control where the caret (text insertion point) resides.
ControlGetCurrentLine Returns the line number in an Edit control where the caret (insert point) resides.
ControlGetEnabled Returns 1 (true) if the control is enabled, or 0 (false) if disabled.
ControlGetFocus Retrieves which control of the target window has input focus, if any.
ControlGetHwnd Retrieves the window handle (HWND) of the specified control.
ControlGetLine Returns the text of line N in an Edit control.
ControlGetLineCount Returns the number of lines in an Edit control.
ControlGetList Retrieves a list of items from a ListView, ListBox, ComboBox, or DropDownList.
ControlGetPos Retrieves the position and size of a control.
ControlGetSelected Returns the selected text in an Edit control.
ControlGetStyle / ControlGetExStyle Retrieves an integer representing the style or extended style of the control.
ControlGetTab Returns the position number of the selected tab in a SysTabControl32.
ControlGetText Retrieves text from a control.
ControlGetVisible Returns 1 (true) if the control is visible, or 0 (false) if hidden.
ControlHide Hides a control.
ControlHideDropDown Hides the drop-down window of a ComboBox if it is visible.
ControlMove Moves or resizes a control.
ControlSend / ControlSendRaw Sends simulated keystrokes to a window or control.
ControlSetChecked Turns on (checks) or turns off (unchecks) a radio button or checkbox.
ControlSetEnabled Enables or disables a control.
ControlSetStyle / ControlSetExStyle Changes the style or extended style of a control, respectively.
ControlSetTab Selects the Nth tab in a SysTabControl32.
ControlSetText Changes the text of a control.
ControlShow Shows a control if it was previously hidden.
ControlShowDropDown Drops a ComboBox so that its choices become visible.
CoordMode Sets coordinate mode for various functions to be relative to either the active window or the screen.
Cos Returns the trigonometric cosine of Number.
Critical Prevents the current thread from being interrupted by other threads, or enables it to be interrupted.
DateAdd Adds or subtracts time from a date-time value.
DateDiff Compares two date-time values and returns the difference.
DetectHiddenText Determines whether invisible text in a window is "seen" for the purpose of finding the window. This affects built-in functions such as WinExist and WinActivate.
DetectHiddenWindows Determines whether invisible windows are "seen" by the script.
DirCopy Copies a folder along with all its sub-folders and files (similar to xcopy).
DirCreate Creates a folder.
DirDelete Deletes a folder.
DirMove Moves a folder along with all its sub-folders and files. It can also rename a folder.

Displays a standard dialog that allows the user to select a folder.

DllCall Calls a function inside a DLL, such as a standard Windows API function.
Download Downloads a file from the Internet.
Drive Ejects/retracts the tray in a CD or DVD drive, or sets a drive's volume label.
DriveGet Retrieves various types of information about the computer's drive(s).
Edit Opens the current script for editing in the associated editor.
Else Specifies the function(s) to perform if an IF-statement evaluates to FALSE. When more than one function is present, enclose them in a block (braces).
EnvGet Retrieves an environment variable.
EnvSet Writes a value to a variable contained in the environment.
Exit Exits the current thread. If the script is not persistent and this is the last thread, the entire script exits.
ExitApp Terminates the script unconditionally.
Exp Returns e (which is approximately 2.71828182845905) raised to the Nth power.
FileAppend Writes text to the end of a file (first creating the file, if necessary).
FileCopy Copies one or more files.
FileCreateShortcut Creates a shortcut (.lnk) file.
FileDelete Deletes one or more files.
FileEncoding Sets the default encoding for FileRead, Loop Read, FileAppend, and FileOpen.
FileExist Checks for the existence of a file or folder and returns its attributes.
FileInstall Includes the specified file inside the compiled version of the script.
FileGetAttrib Reports whether a file or folder is read-only, hidden, etc.
FileGetShortcut Retrieves information about a shortcut (.lnk) file, such as its target file.
FileGetSize Retrieves the size of a file.
FileGetTime Retrieves the datetime stamp of a file or folder.
FileGetVersion Retrieves the version of a file.
FileMove Moves or renames one or more files.
FileOpen Provides object-oriented file I/O.
FileRead Reads a file's contents into a variable.
FileRecycle Sends a file or directory to the recycle bin, if possible.
FileRecycleEmpty Empties the recycle bin.
FileSelect Displays a standard dialog that allows the user to open or save file(s).
FileSetAttrib Changes the attributes of one or more files or folders. Wildcards are supported.
FileSetTime Changes the datetime stamp of one or more files or folders. Wildcards are supported.
Finally Ensures that a block of code is always executed after a Try statement finishes.
Floor Returns Number rounded down to the nearest integer (without any .00 suffix).
For Repeats a series of functions once for each key-value pair in an object.
Format Formats a variable number of input values according to a format string.
FormatTime Transforms a YYYYMMDDHH24MISS timestamp into the specified date/time format.
Func Retrieves a reference to a function.
GetKeyName Retrieves the name or text of a key.
GetKeyVK Retrieves the virtual key code of a key.
GetKeySC Retrieves the scan code of a key.
GetKeyState Checks if a keyboard key or mouse/joystick button is down or up. Also retrieves joystick status.
Gosub Jumps to the specified label and continues execution until Return is encountered.
Goto Jumps to the specified label and continues execution.
GroupActivate Activates the next window in a window group that was defined with GroupAdd.
GroupAdd Adds a window specification to a window group, creating the group if necessary.
GroupClose Closes the active window if it was just activated by GroupActivate or GroupDeactivate. It then activates the next window in the series. It can also close all windows in a group.
GroupDeactivate Similar to GroupActivate except activates the next window not in the group.
GuiCreate Creates a new Gui object, which is essential for creating and managing a GUI.
GuiCtrlFromHwnd Retrieves the GuiControl object of a GUI control associated with the specified HWND.
GuiFromHwnd Retrieves the Gui object of a GUI window associated with the specified HWND.
Hotkey Creates, modifies, enables, or disables a hotkey while the script is running.
if (expression) Specifies the function(s) to perform if an expression evaluates to TRUE.
ImageSearch Searches a region of the screen for an image.
IniDelete Deletes a value from a standard format .ini file.
IniRead Reads a value from a standard format .ini file.
IniWrite Writes a value to a standard format .ini file.
Input Waits for the user to type a string.
InputEnd Terminates any Input in progress in another thread.
InputBox Displays an input box to ask the user to enter a string.
InStr Searches for a given occurrence of a string, from the left or the right.
IsByRef Returns a non-zero number if a ByRef parameter of a function was supplied with the specified variable.
IsFunc Returns a non-zero number if the specified function exists in the script.
IsLabel Returns a non-zero number if the specified label exists in the script.
IsObject Returns a non-zero number if the specified value is an object.
KeyHistory Displays script info and a history of the most recent keystrokes and mouse clicks.
KeyWait Waits for a key or mouse/joystick button to be released or pressed down.
ListHotkeys Displays the hotkeys in use by the current script, whether their subroutines are currently running, and whether or not they use the keyboard or mouse hook.
ListLines Displays the script lines most recently executed.
ListVars Displays the script's variables: their names and current contents.
LoadPicture Loads a picture from file and returns a bitmap or icon handle.
Log Returns the logarithm (base 10) of Number.
Ln Returns the natural logarithm (base e) of Number.
Loop (normal) Perform a series of functions repeatedly: either the specified number of times or until break is encountered.
Loop (files & folders) Retrieves the specified files or folders, one at a time.
Loop (parse a string) Retrieves substrings (fields) from a string, one at a time.
Loop (read file contents) Retrieves the lines in a text file, one at a time.
Loop (registry) Retrieves the contents of the specified registry subkey, one item at a time.
Menu Creates, deletes, modifies and displays menus and menu items. Changes the tray icon and its tooltip. Controls whether the main window of a compiled script can be opened.
MenuGetHandle Retrieves the Win32 menu handle of a menu.
MenuGetName Retrieves the name of a menu given a handle to its underlying Win32 menu.
MenuSelect Invokes a menu item from the menu bar of the specified window.
Mod Modulo. Returns the remainder when Dividend is divided by Divisor.
MonitorGet Retrieves screen resolution and multi-monitor info.
MouseClick Clicks or holds down a mouse button, or turns the mouse wheel. NOTE: The Click function is generally more flexible and easier to use.
MouseClickDrag Clicks and holds the specified mouse button, moves the mouse to the destination coordinates, then releases the button.
MouseGetPos Retrieves the current position of the mouse cursor, and optionally which window and control it is hovering over.
MouseMove Moves the mouse cursor.
MsgBox Displays the specified text in a small window containing one or more buttons (such as Yes and No).
NumGet Returns the binary number stored at the specified address+offset.
NumPut Stores a number in binary format at the specified address+offset.
ObjAddRef / ObjRelease Increments or decrements an object's reference count.
ObjBindMethod Creates a BoundFunc object which calls a method of a given object.
These functions are equivalent to built-in methods of the Object type. It is usually recommended to use the corresponding method instead.
ObjRawSet Stores or overwrites a key-value pair in an object, bypassing the object's meta-functions.
OnClipboardChange Registers a function or function object to run whenever the clipboard's content changes.
OnExit Specifies a function to call automatically when the script exits.
OnMessage Specifies a function to call automatically when the script receives the specified message.
Ord Returns the ordinal value (numeric character code) of the first character in the specified string.
OutputDebug Sends a string to the debugger (if any) for display.
Pause Pauses the script's current thread.
PixelGetColor Retrieves the color of the pixel at the specified x,y coordinates.
PixelSearch Searches a region of the screen for a pixel of the specified color.
PostMessage Places a message in the message queue of a window or control.
ProcessClose Terminates a process.
ProcessExist Checks if a matching process exists (is running).
ProcessSetPriority Changes the priority of a process.
ProcessWait Waits until a matching process exists (is running).
ProcessWaitClose Waits for all matching processes to close.
Random Generates a pseudo-random number.
RegExMatch Determines whether a string contains a pattern (regular expression).
RegExReplace Replaces occurrences of a pattern (regular expression) inside a string.
RegDelete Deletes a value from the registry.
RegDeleteKey Deletes a subkey from the registry.
RegRead Reads a value from the registry.
RegWrite Writes a value to the registry.
RegisterCallback Creates a machine-code address that when called, redirects the call to a function in the script.
Reload Replaces the currently running instance of the script with a new one.
Return Returns from a subroutine to which execution had previously jumped via function-call, Gosub, Hotkey activation, GroupActivate, or other means.
Round If N is omitted or 0, Number is rounded to the nearest integer. If N is positive number, Number is rounded to N decimal places. If N is negative, Number is rounded by N digits to the left of the decimal point.
Run Runs an external program.
RunAs Specifies a set of user credentials to use for all subsequent uses of Run and RunWait.
RunWait Runs an external program and waits until it finishes.
Send / SendRaw / SendInput / SendPlay Sends simulated keystrokes and mouse clicks to the active window.
SendLevel Controls which artificial keyboard and mouse events are ignored by hotkeys and hotstrings.
SendMessage Sends a message to a window or control and waits for acknowledgement.
SendMode Makes Send synonymous with SendInput or SendPlay rather than the default (SendEvent). Also makes Click and MouseMove/Click/Drag use the specified method.
SetCapslockState Sets the state of the Capslock key. Can also force the key to stay on or off.
SetControlDelay Sets the delay that will occur after each control-modifying function.
SetDefaultMouseSpeed Sets the mouse speed that will be used if unspecified in Click and MouseMove/Click/Drag.
SetKeyDelay Sets the delay that will occur after each keystroke sent by Send or ControlSend.
SetMouseDelay Sets the delay that will occur after each mouse movement or click.
SetNumlockState Sets the state of the Numlock key. Can also force the key to stay on or off.
SetScrollLockState Sets the state of the Scrolllock key. Can also force the key to stay on or off.
SetRegView Allows registry functions in a 32-bit script to access the 64-bit registry view and vice versa.
SetStoreCapslockMode Whether to restore the state of CapsLock after a Send.
SetTimer Causes a subroutine to be launched automatically and repeatedly at a specified time interval.
SetTitleMatchMode Sets the matching behavior of the WinTitle parameter in built-in functions such as WinWait.
SetWinDelay Sets the delay that will occur after each windowing function, such as WinActivate.
SetWorkingDir Changes the script's current working directory.
Shutdown Shuts down, restarts, or logs off the system.
Sin Returns the trigonometric sine of Number.
Sleep Waits the specified amount of time before continuing.
Sort Arranges a variable's contents in alphabetical, numerical, or random order (optionally removing duplicates).
SoundBeep Emits a tone from the PC speaker.
SoundGet Retrieves various settings from a sound device (master mute, master volume, etc.)
SoundPlay Plays a sound, video, or other supported file type.
SoundSet Changes various settings of a sound device (master mute, master volume, etc.)
SplitPath Separates a file name or URL into its name, directory, extension, and drive.
Sqrt Returns the square root of Number.
StatusBarGetText Retrieves the text from a standard status bar control.
StatusBarWait Waits until a window's status bar contains the specified string.
StrPut / StrGet Copies a string to or from a memory address, optional converting it between code pages.
StringCaseSense Determines whether string comparisons are case sensitive (default is "not case sensitive").
StrLen Retrieves the count of how many characters are in a string.
StrLower Converts a string to lowercase.
StrReplace Replaces the specified substring with a new string.
StrSplit Separates a string into an array of substrings using the specified delimiters.
StrUpper Converts a string to uppercase.
SubStr Retrieves one or more characters from the specified position in a string.
Suspend Disables or enables all or selected hotkeys and hotstrings.
SysGet Retrieves screen resolution, multi-monitor info, dimensions of system objects, and other system properties.
Tan Returns the trigonometric tangent of Number.
Thread Sets the priority or interruptibility of threads. It can also temporarily disable all timers.
Throw Signals the occurrence of an error. This signal can be caught by a try-catch statement.
ToolTip Creates an always-on-top window anywhere on the screen.
TrayTip Creates a balloon message window or toast notification near the tray icon.
Trim Trims certain characters from the beginning and/or end of a string.
Try Guards one or more statements (functions or expressions) against runtime errors and exceptions thrown by the throw statement.
Type Returns the exact type of a value.
Until Applies a condition to the continuation of a Loop or For-loop.
Var := expression Evaluates an expression and stores the result in a variable.
VarSetCapacity Enlarges a variable's holding capacity or frees its memory. Normally, this is necessary only for unusual circumstances such as DllCall.
While-loop Performs a series of functions repeatedly until the specified expression evaluates to false.
WinActivate Activates the specified window (makes it foremost).
WinActivateBottom Same as WinActivate except that it activates the bottommost (least recently active) matching window rather than the topmost.
WinActive Returns the Unique ID (HWND) of the active window if it matches the specified criteria.
WinClose Closes the specified window.
WinExist Returns the Unique ID (HWND) of the first matching window.
WinGetClass Retrieves the specified window's class name.
WinGetControls / WinGetControlsHwnd Retrieves an array of control names or unique ID numbers (HWND/handle) for all controls in the specified window.
WinGetCount Retrieves the number of matching windows.
WinGetExStyle Retrieves an integer representing the extended style of the specified window.
WinGetID / WinGetIDLast Retrieves the unique ID number (HWND/handle) of the first or last matching window.
WinGetList Retrieves the unique ID numbers of all matching windows.
WinGetMinMax Retrieves the minimized/maximized state of the specified window.
WinGetPID / WinGetProcessName / WinGetProcessPath Retrieves the ID, name or full path of the process which owns the specified window.
WinGetPos Retrieves the position and size of the specified window.
WinGetStyle Retrieves an integer representing the style of the specified window.
WinGetText Retrieves the text from the specified window.
WinGetTitle Retrieves the title of the specified window.
WinGetTransColor Retrieves the color that is marked transparent in the specified window, if any.
WinGetTransparent Retrieves the degree of transparency of the specified window, if any.
WinHide Hides the specified window.
WinKill Forces the specified window to close.
WinMaximize Enlarges the specified window to its maximum size.
WinMinimize Collapses the specified window into a button on the task bar.
WinMinimizeAll Minimizes all windows.
WinMinimizeAllUndo Reverses the effect of a previous WinMinimizeAll.
WinMove Changes the position and/or size of the specified window.
WinMoveBottom Sends a window to the bottom of stack; that is, beneath all other windows.
WinMoveTop Brings a window to the top of the stack without explicitly activating it.
WinRedraw Attempts to update the appearance/contents of a window.
WinRestore Unminimizes or unmaximizes the specified window if it is minimized or maximized.
WinSetAlwaysOnTop Makes a window stay on top of all other windows (except other always-on-top windows).
WinSetEnabled Enables or disables a window.
WinSetExStyle Changes the extended style of a window.
WinSetRegion Changes the shape of a window to be the specified rectangle, ellipse, or polygon.
WinSetStyle Changes the style of a window.
WinSetTitle Changes the title of the specified window.
WinSetTransColor Makes all pixels of the chosen color invisible inside the target window.
WinSetTransparent Makes a window semi-transparent.
WinShow Unhides the specified window.
WinWait Waits until the specified window exists.
WinWaitActive Waits until the specified window is active.
WinWaitClose Waits until the specified window does not exist.
WinWaitNotActive Waits until the specified window is not active.
#ClipboardTimeout Changes how long the script keeps trying to access the clipboard when the first attempt fails.
#ErrorStdOut Sends any syntax error that prevents a script from launching to stdout rather than displaying a dialog.
#HotkeyInterval Along with #MaxHotkeysPerInterval, specifies the rate of hotkey activations beyond which a warning dialog will be displayed.
#HotkeyModifierTimeout Affects the behavior of hotkey modifiers: CTRL, ALT, WIN, and SHIFT.
#Hotstring Changes hotstring options or ending characters.
#If Similar to #IfWinActive, but for arbitrary expressions.
#IfTimeout Sets the maximum time that may be spent evaluating a single #If expression.
#IfWinActive / #IfWinExist Creates context-sensitive hotkeys and hotstrings. Such hotkeys perform a different action (or none at all) depending on the type of window that is active or exists.
#Include Causes the script to behave as though the specified file's contents are present at this exact position.
#InputLevel Controls which artificial keyboard and mouse events are ignored by hotkeys and hotstrings.
#InstallKeybdHook Forces the unconditional installation of the keyboard hook.
#InstallMouseHook Forces the unconditional installation of the mouse hook.
#KeyHistory Sets the maximum number of keyboard and mouse events displayed by the KeyHistory window. You can set it to 0 to disable key history.
#MaxHotkeysPerInterval Along with #HotkeyInterval, specifies the rate of hotkey activations beyond which a warning dialog will be displayed.
#MaxThreads Sets the maximum number of simultaneous threads.
#MaxThreadsBuffer Causes some or all hotkeys to buffer rather than ignore keypresses when their #MaxThreadsPerHotkey limit has been reached.
#MaxThreadsPerHotkey Sets the maximum number of simultaneous threads per hotkey or hotstring.
#MenuMaskKey Changes which key is used to mask Win or Alt keyup events.
#NoTrayIcon Disables the showing of a tray icon.
#Persistent Keeps a script permanently running (that is, until the user closes it or ExitApp is encountered).
#SingleInstance Determines whether a script is allowed to run again when it is already running.
#UseHook Forces the use of the hook to implement all or some keyboard hotkeys.
#Warn Enables or disables warnings for selected conditions that may be indicative of developer errors.
#WinActivateForce Skips the gentle method of activating a window and goes straight to the forceful method.