AutoHotKey(오토핫키) 설명서 WinMenuSelectItem

Posted by 발전소장
2014. 8. 14. 14:32 AutoHotKey/Commands

WinMenuSelectItem

지정 윈도우의 도구모음의 커멘드를 실행한다

WinMenuSelectItem, WinTitle, WinText, Menu [, SubMenu1, SubMenu2, SubMenu3, SubMenu4, SubMenu5, SubMenu6, ExcludeTitle, ExcludeText] 

Parameters

인수명설명
WinTitle 윈도우 타이틀 등.
윈도우 지정의 방법참조.
WinText 윈도우에 포함되는 텍스트
Menu 최상위의 메뉴명.「파일(F)」 등.
「1&」(와)과 같이 하고, 항목의 위치에서 지정하는 일도 가능.(단락선도 수에 센다)
SubMenu1...SubMenu6 부메뉴의 메뉴명.
ExcludeTitle 제외 타이틀
ExcludeText 제외 텍스트

ErrorLevel

성공하면 「0」, 실패하면 「1」

Remarks

액티브하지 않은 윈도우도 조작 가능하지만, 최소화되고 있는 윈도우는 조작할 수 없는 경우가 있다.

특수한 사양의 도구모음을 사용하고 있는 경우, 이 커멘드로 조작하는 것은 할 수 없다.
PostMessage그리고WM_COMMAND(을)를 사용한다인가ControlSend그리고 단축 키를 보내는 것으로 대용할 수 있다.

메뉴명은, 대문자 소문자를 구별하지 않는다.
또, 밑줄 첨부의 문자는, 「(&F)」(와)과 같이 쓰지 않고 「(F)」라고 써도 상관없다.

Related

ControlSend, PostMessage

Example(s)

; This will select File->Open in Notepad: 
WinMenuSelectItem, Untitled - Notepad, , File, Open
; Same as above except it's done by position vs. name:
WinMenuSelectItem, Untitled - Notepad, , 1&, 2&


AutoHotKey(오토핫키) 설명서 WinMaximize

Posted by 발전소장
2014. 8. 14. 14:32 AutoHotKey/Commands

WinMaximize

윈도우를 최대화한다.

WinMaximize [, WinTitle, WinText, ExcludeTitle, ExcludeText]

Parameters

인수명설명
WinTitle 윈도우 타이틀 등.
윈도우 지정의 방법참조.
WinText 윈도우에 포함되는 텍스트
ExcludeTitle 제외 타이틀
ExcludeText 제외 텍스트

Remarks

최대화한 윈도우를 바탕으로 되돌리려면 ,WinRestore커멘드를 사용한다.

일부의 윈도우는 이 방법에서는 최대화할 수 없다.
이하의 방법을 사용하면 최대화할 수 있는 경우가 있다.

PostMessage, 0x112, 0xF030,,, WinTitle, WinText ; 0x112 = WM_SYSCOMMAND, 0xF030 = SC_MAXIMIZE

Related

WinRestore, WinMinimize

Example(s)

Run, notepad.exe
WinWait, Untitled - Notepad
WinMaximize ; use the window found above


^Up::WinMaximize, A  ; Assign a hotkey to maximize the active window.


AutoHotKey(오토핫키) 설명서 WinKill

Posted by 발전소장
2014. 8. 14. 14:31 AutoHotKey/Commands

WinKill

윈도우를 강제적으로 닫는다

WinKill [, WinTitle, WinText, SecondsToWait, ExcludeTitle, ExcludeText]

Parameters

인수명설명
WinTitle 윈도우 타이틀 등.
윈도우 지정의 방법참조.
WinText 윈도우에 포함되는 텍스트
SecondsToWait 윈도우가 완전하게 닫혀질 때까지 대기하는 시간.
생략시는 일절 기다리지 않는다.「0」(을)를 지정하면,500밀리 세컨드 기다린다.
WinWaitClose의 기능과 닮아 있지만,ErrorLevel그리고 윈도우가 닫혀졌는지를 취득하는 것은 할 수 없다.
ExcludeTitle 제외 타이틀
ExcludeText 제외 텍스트

Remarks

이 커멘드를 실행하면, 우선 최초로 윈도우를 닫는 것을 시도해 거기에 실패하면 프로세스를 강제 종료하는 것으로 윈도우를 닫는다.

제일 전면의 윈도우가 대상이 된다.

Related

WinClose, WinWaitClose, WinActivate, SetTitleMatchMode, DetectHiddenWindows, Last Found Window, IfWinExist, IfWinActive, WinWaitActive, WinWait, GroupActivate

Example(s)

IfWinExist, Untitled - Notepad
	WinKill ; use the window found above
else
	WinKill, Calculator


AutoHotKey(오토핫키) 설명서 WinHide

Posted by 발전소장
2014. 8. 14. 14:31 AutoHotKey/Commands

WinHide

윈도우를 비표시로 한다

WinHide [, WinTitle, WinText, ExcludeTitle, ExcludeText]

Parameters

인수명설명
WinTitle 윈도우 타이틀 등.
윈도우 지정의 방법참조.
WinText 윈도우에 포함되는 텍스트
ExcludeTitle 제외 타이틀
ExcludeText 제외 텍스트

Remarks

비표시의 윈도우를 표시시키려면 ,WinShow커멘드를 사용한다.

Related

WinShow, SetTitleMatchMode, DetectHiddenWindows, Last Found Window, WinSet

Example(s)

Run, notepad.exe
WinWait, Untitled - Notepad
Sleep, 500
WinHide ; use the window found above
Sleep, 1000
WinShow


AutoHotKey(오토핫키) 설명서 WinGetTitle

Posted by 발전소장
2014. 8. 14. 14:31 AutoHotKey/Commands

WinGetTitle

지정된 윈도우의 타이틀을 취득

WinGetTitle, OutputVar [, WinTitle, WinText, ExcludeTitle, ExcludeText]

Parameters

인수명설명
OutputVar 타이틀을 격납하는 변수명
WinTitle 윈도우 타이틀 등.
윈도우 지정의 방법참조.
WinText 윈도우에 포함되는 텍스트
ExcludeTitle 제외 타이틀
ExcludeText 제외 텍스트

Remarks

마우스아래의 윈도우의 타이틀을 취득하려면 ,MouseGetPos(와)과 조합한다.

Related

WinGetActiveStats, WinGetActiveTitle, WinGetClass, WinGet, WinGetText, ControlGetText, WinGetPos

Example(s)

WinGetTitle, Title, A
MsgBox, The active window is "%Title%".


AutoHotKey(오토핫키) 설명서 WinGetText

Posted by 발전소장
2014. 8. 14. 14:30 AutoHotKey/Commands

WinGetText

지정된 윈도우의 텍스트를 취득

WinGetText, OutputVar [, WinTitle, WinText, ExcludeTitle, ExcludeText]

Parameters

인수명설명
OutputVar 텍스트를 격납하는 변수명
WinTitle 윈도우 타이틀 등.
윈도우 지정의 방법참조.
WinText 윈도우에 포함되는 텍스트
ExcludeTitle 제외 타이틀
ExcludeText 제외 텍스트

ErrorLevel

무엇인가 문제가 발생하면ErrorLevel하1(이)가 된다.문제가 없으면0(이)가 된다.

Remarks

AutoHotkey동고의 「AU3_Spy.exe」(으)로 표시되는 형식에서 윈도우상의 컨트롤의 텍스트를 취득한다.

각 텍스트 항목은,CR+LF(스크립트상에서는 「`r`n」라고 기술)그리고 단락지어진다.

NT계에서는, 취득할 수 있는 텍스트의 양에 상한은 없다.
거대한 텍스트를 열고 있는 텍스트 문자 편집기 등에 대해 사용하면, 대량의 메모리를 소비하게 된다.
OutputVar=」(와)과 같이 공문자열을 대입해 주면, 사용한 메모리는 개방할 수 있다.
9x계에서는, 윈도우 컨트롤 마다64KB까지 제한되고 있다.

Related

WinGetActiveStats, WinGetActiveTitle, WinGetTitle, ControlGetText, WinGetPos

Example(s)

Run, Calc.exe
WinWait, Calculator
WinGetText, text  ; The window found above will be used.
MsgBox, The text is:`n%text%


AutoHotKey(오토핫키) 설명서 WinGetPos

Posted by 발전소장
2014. 8. 14. 14:30 AutoHotKey/Commands

WinGetPos

지정된 윈도우의 위치와 사이즈를 취득

WinGetPos [, X, Y, Width, Height, WinTitle, WinText, ExcludeTitle, ExcludeText] 

Parameters

인수명설명
X, Y 윈도우의 수평 좌표와 수직 좌표를 격납하는 변수명.
생략시는 그 항목은 취득되지 않는다.
Width/Height 윈도우의 폭과 높이를 취득하는 변수명.
생략시는 그 항목은 취득되지 않는다.
WinTitle 윈도우 타이틀 등.
윈도우 지정의 방법참조.
WinText 윈도우에 포함되는 텍스트
ExcludeTitle 제외 타이틀
ExcludeText 제외 텍스트

Remarks

조건에 일치하는 윈도우가 존재하지 않는 경우, 각 변수는 모두 비운다.

WinTitle에 「Program Manager」(을)를 지정하면, 데스크탑의 사이즈를 취득할 수 있다.
이것은 스크린의 사이즈와 같게 된다.
(쉘이Explorer의 경우)

윈도우가 최소화되고 있는 경우,X(와)과Y(은)는 「-32000」 등(OS에 따라서는 다를 가능성 있어)(이)가 된다.

Related

WinMove, ControlGetPos, WinGetActiveStats, WinGetActiveTitle, WinGetTitle, WinGetText, ControlGetText

Example(s)

WinGetPos, X, Y, Width, Height, Calculator
MsgBox, Calculator is at %X%`,%Y%

WinGetPos, X, Y, , , A  ; "A" to get the active window's pos.
MsgBox, The active window is at %X%`,%Y%

IfWinExist, Untitled - Notepad
{
	WinGetPos, Xpos, Ypos  ; Uses the window found above.
	MsgBox, Notepad is at %Xpos%`,%Ypos%
}


AutoHotKey(오토핫키) 설명서 WinGetClass

Posted by 발전소장
2014. 8. 14. 14:29 AutoHotKey/Commands

WinGetClass

지정된 윈도우의 클래스명을 취득

WinGetClass, OutputVar [, WinTitle, WinText, ExcludeTitle, ExcludeText]

Parameters

인수명설명
OutputVar 클래스명을 격납하는 변수명
WinTitle 윈도우 타이틀 등.
윈도우 지정의 방법참조.
WinText 윈도우에 포함되는 텍스트
ExcludeTitle 제외 타이틀
ExcludeText 제외 텍스트

Remarks

윈도우의 종류를 나타내는 클래스명을 취득할 수 있다.

취득한 클래스명은, 윈도우 관련 커멘드의WinTitle(을)를 지정하는 (곳)중에 「ahk_class %OutputVar%」(와)과 같이 해 사용할 수 있다.

Related

WinGet, WinGetTitle

Example(s)

WinGetClass, class, A
MsgBox, The active window's class is "%class%".


AutoHotKey(오토핫키) 설명서 WinGetActiveTitle

Posted by 발전소장
2014. 8. 14. 14:29 AutoHotKey/Commands

WinGetActiveTitle

액티브 윈도우의 타이틀을 취득

WinGetActiveTitle, OutputVar 

Parameters

인수명설명
OutputVar 취득한 타이틀을 격납하는 변수명

Remarks

WinGetTitle, OutputVar, A」와 같은 동작.

Related

WinGetPos, WinGetActiveStats, WinGetTitle, WinGetClass, WinGetText, ControlGetText

Example(s)

WinGetActiveTitle, Title
MsgBox, The active window is "%Title%".


AutoHotKey(오토핫키) 설명서 WinGetActiveStats

Posted by 발전소장
2014. 8. 14. 14:29 AutoHotKey/Commands

WinGetActiveStats

액티브 윈도우의 타이틀과 사이즈, 위치를 취득

WinGetActiveStats, Title, Width, Height, X, Y 

Parameters

인수명설명
Title 타이틀을 격납하는 변수명
Width/Height 윈도우의 폭과 높이를 격납하는 변수명
X, Y 윈도우의 수평 좌표와 수직 좌표를 격납하는 변수명

Remarks

This command is equivalent to the following sequence:
WinGetTitle, Title, A」와「WinGetPos, X, Y, Width, Height, A」(을)를 실행하는 것과 같다.

Related

WinGetPos, WinGetActiveTitle, WinGetTitle, WinGetClass, WinGetText, ControlGetText

Example(s)

WinGetActiveStats, Title, Width, Height, X, Y
MsgBox, The active window "%Title%" is %Width% wide`, %Height% tall`, and positioned at %X%`,%Y%.