Below is a list of AutoIt-related macros.
@Unicode has been replaced by @AutoItUnicode as the return is associated to AutoIt executable
and not on Windows System capability. It is accepted as an alias and will be removed after AutoIt version 3.2.14.0
The full list of macros can be found here.
| Macro | Description |
| @compiled | Returns 1 if script is a compiled executable; otherwise, returns 0. |
| @error | Status of the error flag. See the SetError function. |
| @exitCode | Exit code as set by Exit statement. |
| @exitMethod | See the Func OnAutoItExit(). |
| @extended |
Extended function return - used in certain functions such as StringReplace. |
| @NumParams | Number of parameters used in calling the user function. |
| @ScriptName |
Filename of the running script. |
| @ScriptDir |
Directory containing the running script. (Result does not contain a trailing backslash) |
| @ScriptFullPath |
Equivalent to @ScriptDir & "\" & @ScriptName |
| @ScriptLineNumber | Line number currently being executed. Useful for debug statements specially when a function is call you can pass the caller line number. (Not significant in compiled script) |
| @WorkingDir |
Current/active working directory. (Result does not contain a trailing backslash) |
| @AutoItExe | The full path and filename of the AutoIt executable currently running. For compiled scripts it is the path of the compiled script. |
| @AutoItPID | PID of the process in which the script is running. |
| @AutoItUnicode | Returns 1 if running using the Unicode version of AutoIt (AutoIt3.exe) or 0 if running the ANSI version (AutoIt3A.exe). Usually, this macro should not be required as AutoIt handles any Unicode/ANSI conversions. However, with certain DllCalls() or use of direct Windows messages this may be required. |
| @AutoItVersion |
Version number of AutoIt such as 3.0.102.0 |
| @AutoItX64 | Returns 1 if the script is running under the native x64 version of AutoIt. |
| @InetGetActive | Is 1 if a InetGet download is currently active, otherwise is 0. |
| @InetGetBytesRead | During a InetGet download this is the number of bytes currently read. It is -1 when there is an error downloading. |
| @COM_EventObj | Object the COM event is being fired on. Only valid in a COM event Function. |
| @GUI_CtrlId | Last click GUI Control identifier. Only valid in an event Function. See the GUICtrlSetOnEvent function. |
| @GUI_CtrlHandle | Last click GUI Control handle. Only valid in an event Function. See the GUICtrlSetOnEvent function. |
| @GUI_DragID | Drag GUI Control identifier. Only valid on Drop Event. See the GUISetOnEvent function. |
| @GUI_DragFile | Filename of the file being dropped. Only valid on Drop Event. See the GUISetOnEvent function. |
| @GUI_DropID | Drop GUI Control identifier. Only valid on Drop Event. See the GUISetOnEvent function. |
| @GUI_WinHandle | Last click GUI Window handle. Only valid in an event Function. See the GUICtrlSetOnEvent function. |
| @HotKeyPressed | Last HotKey pressed. See the HotkeySet function |
| For use with the WinSetState,
Run, RunWait, FileCreateShortcut and FileGetShortcut functions: |
|
| @SW_DISABLE | Disables the window. |
| @SW_ENABLE | Enables the window. |
| @SW_HIDE | Hides the window and activates another window. |
| @SW_LOCK | Lock window to avoid painting. |
| @SW_MAXIMIZE | Maximizes the specified window. |
| @SW_MINIMIZE | Minimizes the specified window and activates the next top-level window in the Z order. |
| @SW_RESTORE | Activates and displays the window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when restoring a minimized window. |
| @SW_SHOW | Activates the window and displays it in its current size and position. |
| @SW_SHOWDEFAULT | Sets the show state based on the SW_ value specified by the program that started the application. |
| @SW_SHOWMAXIMIZED | Activates the window and displays it as a maximized window. |
| @SW_SHOWMINIMIZED | Activates the window and displays it as a minimized window. |
| @SW_SHOWMINNOACTIVE | Displays the window as a minimized window. This value is similar to @SW_SHOWMINIMIZED, except the window is not activated. |
| @SW_SHOWNA | Displays the window in its current size and position. This value is similar to @SW_SHOW, except the window is not activated. |
| @SW_SHOWNOACTIVATE | Displays a window in its most recent size and position. This value is similar to @SW_SHOWNORMAL, except the window is not activated. |
| @SW_SHOWNORMAL | Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when displaying the window for the first time. |
| @SW_UNLOCK | Unlock windows to allow painting. |
| @TRAY_ID | Last clicked item identifier during a TraySet(Item)OnEvent action. |
| @TrayIconFlashing | Returns 1 if tray icon is flashing; otherwise, returns 0. |
| @TrayIconVisible | Returns 1 if tray icon is visible; otherwise, returns 0. |
| @CR |
Carriage return, Chr(13); sometimes used for line breaks. |
| @LF |
Line feed, Chr(10); typically used for line breaks. |
| @CRLF |
= @CR & @LF ;occasionally used for line breaks. |
| @TAB |
Tab character, Chr(9) |