: The built-in A_CoordMode variables contain the current settings. That default may be changed by using this command in the auto-execute section (top part of the script). WinMove and InputBox) use coordinates that are relative to the active window.Įvery newly launched thread (such as a hotkey, custom menu item, or timed subroutine) starts off fresh with the default setting for this command. If this command is not used, all commands except those documented otherwise (e.g. Client coordinates are less dependent on OS version and theme. SetWorkingDir AScriptDir Ensures a consistent starting directory. SendMode Input Recommended for new scripts due to its superior speed and reliability. Warn Recommended for catching common errors. Window : Synonymous with Relative and recommended for clarity.Ĭlient : Coordinates are relative to the active window's client area, which excludes the window's title bar, menu (if it has a standard one) and borders. Display mouse coordinates and copy them if needed - posted in Scripts and Functions: NoEnv Recommended for performance and compatibility with future AutoHotkey releases. Of course there's the other method where you just drag the crosshair and it'll list the coordinates, but I prefer doing it this way instead. Now whenever you press the key 'z', a pop up box will show your current mouse positions coordinates. Relative: Coordinates are relative to the active window. Open autoit v3, browse to that script and open it. Screen: Coordinates are relative to the desktop (entire screen). Specify one of the following words (if omitted, it defaults to Screen): MouseCoordMode: Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window: 0 relative coords to the active window 1 absolute screen coordinates. Time in milliseconds to pause (default250). The area to which TargetType is to be related. Alters the length of the brief pause at the start and end of a mouse drag operation. Menu: Affects the Menu Show command when coordinates are specified for it. Mouse: Affects MouseGetPos, Click, and MouseMove/ Click/ Drag.Ĭaret: Affects the built-in variables A_CaretX and A_CaretY. Pixel: Affects PixelGetColor, PixelSearch, and ImageSearch. PixelSearch locates a pixel or group of pixels in a region of the screen or an image and returns the coordinates of the found pixel(s). The PixelSearch command is like Google Image search on steroids. A speed of 0 will move the mouse instantly. CoordMode, TargetType, RelativeTo Parameters TargetType speed: Optional: the speed to move the mouse in the range 1 (fastest) to 100 (slowest). Sets coordinate mode for various commands to be relative to either the active window or the screen. CoordMode - Syntax & Usage | AutoHotkey CoordMode