Checks if the specified window is active and returns its unique ID (HWND).
UniqueID := WinActive(WinTitle, WinText, ExcludeTitle, ExcludeText)
This function returns the unique ID (HWND) (as hexadecimal integer) of the active window if it matches the specified criteria, or 0 if it does not.
0이-아닌 모든 숫자는 참("true")으로 간주되므로, 다음 서술문 if WinActive(WinTitle)
는 WinTitle이 활성화되어 있으면 참입니다.
모든 매개변수가 생략되면, 마지막 발견 창이 사용됩니다.
If the active window is a qualified match, the Last Found Window will be updated to be the active window.
활성 창의 유일한 ID를 열람하는 쉬운 방법은 ActiveHwnd := WinExist("A")
입니다.
SetWinDelay does not apply to this function.
창 제목과 텍스트는 대소문자를 구분합니다. 숨은 창은 DetectHiddenWindows가 켜져 있어야 탐지됩니다.
IfWinActive / IfWinNotActive, WinExist(), SetTitleMatchMode, DetectHiddenWindows, 마지막 발견 창, WinActivate, WinWaitActive, WinWait, WinWaitClose, #IfWinActive/Exist
Closes either Notepad or another window, depending on which of them was found by the WinActive functions above. Note that the space between an "ahk_" keyword and its criterion value can be omitted; this is especially useful when using variables, as shown by the second WinActive.
if WinActive("ahk_class Notepad") or WinActive("ahk_class" ClassName) WinClose ; Use the window found by WinActive.