CoordMode

各種内蔵機能の座標モードを、アクティブウィンドウまたはスクリーンに対する相対座標に設定します。

CoordMode TargetType , RelativeTo

パラメータ

TargetType

型:文字列

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.

RelativeTo

型:文字列

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.

備考

この関数を使用しない場合、別に文書化されているもの(WinMoveInputBoxなど)を除くすべての組み込み関数は、アクティブウィンドウのクライアント領域からの相対座標を使用します。

新しく起動するスレッドホットキーカスタムメニュー項目時間指定サブルーチンなど)はすべて、この機能のデフォルト設定で新しくスタートします。このデフォルトは、スクリプト起動時にこの関数を使用することで変更することができます。

組み込みのA_CoordMode変数には、現在の設定が格納されています。

Click, MouseMove, MouseClick, MouseClickDrag, MouseGetPos, PixelGetColor, PixelSearch, ToolTip, Menu.Show

ツールチップを絶対的な画面座標に配置します。

CoordMode "ToolTip", "Screen"

Screen」がデフォルトであるため、上記と同じ効果です。

CoordMode "ToolTip"