コントロールの位置とサイズを取得
ControlGetPos [, X, Y, Width, Height, Control, WinTitle, WinText, ExcludeTitle, ExcludeText]
| 引数名 | 説明 |
|---|---|
| X, Y |
X座標とY座標を格納する変数名。 親ウィンドウの左上からの位置になる。 取得失敗時は空になる。 |
| Width/Height | 横幅と高さを格納する変数名 |
| Control | コントロールを指定。 ウィンドウ指定の方法参照。 |
| WinTitle | ウィンドウタイトルなど。 ウィンドウ指定の方法参照。 |
| WinText | ウィンドウに含まれるテキスト |
| ExcludeTitle | 除外タイトル |
| ExcludeText | 除外テキスト |
ControlMove, WinGetPos, Control, ControlGet, ControlGetText, ControlSetText, ControlClick, ControlFocus, ControlSend
; This working example will continuously update and display the
; name and position of the control currently under the mouse cursor:
Loop
{
Sleep, 100
MouseGetPos, , , WhichWindow, WhichControl
ControlGetPos, x, y, w, h, %WhichControl%, ahk_id %WhichWindow%
ToolTip, %WhichControl%`nX%X%`tY%Y%`nW%W%`t%H%
}