各種内蔵機能の座標モードを、アクティブウィンドウまたはスクリーンに対する相対座標に設定します。
CoordMode TargetType , RelativeTo
型:文字列
Specify one of the following words to indicate the type of target to affect:
ToolTip: Affects ToolTip.
Pixel: Affects PixelGetColor, PixelSearch, and ImageSearch.
Mouse: Affects MouseGetPos, Click, MouseMove, MouseClick, and MouseClickDrag.
Caret: Affects CaretGetPos.
Menu: Affects the Menu.Show method when coordinates are specified for it.
型:文字列
If omitted, it defaults to Screen. Otherwise, specify one of the following words to indicate the area to which TargetType should be relative:
Screen: Coordinates are relative to the desktop (entire screen).
Window: Coordinates are relative to the active window.
Client: 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. クライアント座標は、OSのバージョンやテーマに左右されにくい。
型:文字列
This function returns the previous setting; either Screen, Window or Client.
この関数を使用しない場合、別に文書化されているもの(WinMoveや InputBoxなど)を除くすべての組み込み関数は、アクティブウィンドウのクライアント領域からの相対座標を使用します。
新しく起動するスレッド(ホットキー、カスタムメニュー項目、時間指定サブルーチンなど)はすべて、この機能のデフォルト設定で新しくスタートします。このデフォルトは、スクリプト起動時にこの関数を使用することで変更することができます。
組み込みのA_CoordMode変数には、現在の設定が格納されています。
Click, MouseMove, MouseClick, MouseClickDrag, MouseGetPos, PixelGetColor, PixelSearch, ToolTip, Menu.Show