20200329 1543 

 

01 SysGet 명령

출처: <https://www.autohotkey.com/docs/commands/SysGet.htm>

Retrieves screen resolution, multi-monitor info, dimensions of system objects, and other system properties.

SysGet, OutputVar, SubCommand , Value

 */sub-commands

·         MonitorCount: Retrieves the total number of monitors.

·         MonitorPrimary: Retrieves the number of the primary monitor.

·         Monitor: Retrieves the bounding coordinates of the specified monitor.

·         MonitorWorkArea: Retrieves the working area's bounding coordinates of the specified monitor.

·         MonitorName: Retrieves the name of the specified monitor.

·         (Numeric): Retrieve the corresponding value from the tables below

The built-in variables A_ScreenWidth and A_ScreenHeight contain the dimensions of the primary monitor, in pixels.

놀라운 점: zMonitorWorkArea has zMonitorWorkAreaRight in itself.

AH의 환경설정 변수는 특이하게 알파벳과 숫자를 늘어 놓는 경우가 있다. 심지어 구분자는 공백이다. 콤마가 아니라.

 

02 응용

SysGet, MonitorCount, MonitorCount
SysGet, MonitorPrimary, MonitorPrimary
MsgBox, Monitor Count:`t%MonitorCount%`nPrimary Monitor:`t%MonitorPrimary%
Loop, %MonitorCount%
{
  SysGet, MonitorName, MonitorName, %A_Index%
  SysGet, Monitor, Monitor, %A_Index%
  SysGet, MonitorWorkArea, MonitorWorkArea, %A_Index%
  MsgBox, Monitor:`t#%A_Index%`nName:`t%MonitorName%`nLeft:`t%MonitorLeft% (%MonitorWorkAreaLeft% work)`nTop:`t%MonitorTop% (%MonitorWorkAreaTop% work)`nRight:`t%MonitorRight% (%MonitorWorkAreaRight% work)`nBottom:`t%MonitorBottom% (%MonitorWorkAreaBottom% work)
  MouseMove, MonitorWorkAreaRight, MonitorWorkAreaBottom, 20
}
ExitApp
ESC::ExitApp

 

'[PA] 업무자동화 > [AH]Autohotkey' 카테고리의 다른 글

AH 하나의 명령을 두 줄에 쓰기  (0) 2020.03.29
AH Persistent의 이해  (0) 2020.03.29
AH SciTE4 사용법  (0) 2020.03.29
AH PY와 AH의 결합  (0) 2020.03.29
AH Modular Coding  (0) 2020.03.29
Posted by Weneedu
,


출처: https://privatedevelopnote.tistory.com/81 [개인노트]