# Command Windows
Tip: Right-click on an empty area of a Command Window to display links to AutoHotkey online documentation and related contents.
Table of Contents
- Find a Command
- Common Fields
- Mouse
- Text
- Control
- Pause
- Message Box
- KeyWait
- Window
- Image Search
- Pixel Search
- Image to Text (OCR)
- Run / File / String / Misc.
- Loop
- Loop FilePattern
- Loop Parse
- Loop Read
- Loop Registry
- While-Loop
- For Loop
- Until
- Goto / GoSub
- Label
- Set Timer
- If Statements
- Variables / Arrays
- Functions / Array Methods
- Send Email
- Download Files
- Zip/Unzip Files
- Internet Explorer
- Expression / COM Interface
- PostMessage / SendMessage
Find a Command
This window allows you to easily search for a command or function. Simply type a keyword and the results will be displayed in the box below. Double-Click an item or press Enter to open the target window. You can also use the search bar in the main window toolbar.
Common Fields
The following fields appear on some of the Command Windows and will behave the same for all, therefore will be omitted from their parameters.
Repeat
How many times to execute the command. This field is ignored in some commands. This field accepts Variables & Expressions.
Delay
Time to wait before the next command line, except for the Message box and KeyWait command it sets the Timeout, for the Set Timer command it sets the Period. This field is ignored in some of the commands. This field accepts Variables & Expressions.
Control
Selects the target control to send the command. Use the Get button (...) to easily find a control's name: Point the mouse to its location and Right-Click on it. To operate upon a control's HWND (unique ID), leave the Control parameter blank and specify ahk_id %ControlHwnd% for the WinTitle parameter. This field accepts Variables & Expressions.
The Get button automatically fills the Window field as well, using the selected items in WinTitle.
Window
Title, partial title or identifier of a target window. The first parameter is WinTitle, you can add one or more extra parameters separating them by commas: WinTitle, WinText, ExcludeTitle, ExcludeText. You can omit any of those parameters, including WinTitle. This field accepts Variables & Expressions.
WinTitle matching behavior is determined by Title Match Mode and Detect Hidden Windows settings.
The WinTitle button selects what informations to retrieve from a target window (Title/Class/Process/ID/ProcessID) with the Get tool for the WinTitle parameter. Check one or more items in the list and use the Get button (...) to copy the available information from the window.
Note: The options checked only determine what the Get tool will retrieve, it does not affect the command.
Additionally to WinTitle you can also add the following parameters separated by commas:
- WinText: If present, this parameter must be a substring from a single text element of the target window (as revealed by the included Window Spy utility). Hidden text elements are detected if DetectHiddenText is ON.
- ExcludeTitle: Windows whose titles include this value will not be considered.
- ExcludeText: Windows whose text include this value will not be considered.