Autohotkey, 윈도우 위치 및 크기 알아내기
WinGetPos, winx, winy, winw, winh, WindowTitle
간단설명)
WinGetPos, x위치받아올변수, y위치받아올변수, 윈도우너비받아올변수, 윈도우높이받아올변수, 자료를얻고싶은윈도우타이틀의 앞쪽일부문자
WinGetPos - Syntax & Usage | AutoHotkey
The names of the variables in which to store the X and Y coordinates of the target window's upper left corner. If omitted, the corresponding values will not be stored.
autohotkey.com
WinTitle & Last Found Window | AutoHotkey
The WinTitle Parameter & the Last Found Window Many commands and a few functions have a WinTitle parameter, used to identify which window (or windows) to operate on. This parameter can be the title or partial title of the window, and/or any other criteria
autohotkey.com
예)
IfWinExist, 계산
{
WinGetPos, calx, caly, calw, calh, 계산
MsgBox, 계산기가 %calx%, %caly% 위치에 있고 그 크기는 %calw%, %calh% 입니다.
} else {
MsgBox, 계산기가 열려있지 않습니다!
}