WinKill

지정된 창을 강제로 닫습니다.

WinKill , WinTitle, WinText, SecondsToWait, ExcludeTitle, ExcludeText

매개변수

WinTitle

목표 창을 식별하는 창 제목 또는 다른 기준. WinTitle 참조.

WinText

존재하면, 이 매개변수는 목표 창 텍스트의 부문자열입니다 (동봉된 Window Spy 유틸리티에 노출됨). 숨은 텍스트는 DetectHiddenText가 켜져 있어야 탐지됩니다.

SecondsToWait

생략되거나 비어 있으면, 전혀 기다리지 않습니다. 0이면 500ms 동안 기다립니다. 그렇지 않으면, 지정 개수의 초 동안 창이 닫히기를 기다립니다 (소수점을 허용하고 표현식도 가능합니다). 창이 그 동안 닫히지 않더라도, 스크립트는 실행을 계속합니다. ErrorLevel is not set by this command, so use WinExist(), IfWinExist or WinWaitClose if you need to determine for certain that a window is closed.

ExcludeTitle

제목에 이 값이 있는 창은 무시합니다.

ExcludeText

텍스트에 이 값이 있는 창은 무시합니다.

논평

이 명령어는 먼저 창을 정상적으로 닫으려고 간략하게 시도합니다. 실패하면, 그의 프로세스를 종료하여 그 창을 강제로 닫으려고 시도합니다.

If a matching window is active, that window will be closed in preference to any other matching window. 일반적으로, 여러 창이 부합하면, 최상위 (가장 최근에 사용된) 창이 닫힙니다.

This command operates only upon a single window except when WinTitle is ahk_group GroupName, in which case all windows in the group are affected.

창 제목과 텍스트는 대소문자를 구분합니다. 숨은 창은 DetectHiddenWindows가 켜져 있어야 탐지됩니다.

WinClose, WinWaitClose, Process, WinActivate, SetTitleMatchMode, DetectHiddenWindows, 마지막 발견 창, WinExist(), WinActive(), WinWaitActive, WinWait, GroupActivate

예제

If Notepad does exist, force it to close, otherwise force the calculator to close.

if WinExist("Untitled - Notepad")
    WinKill ; Use the window found by WinExist.
else
    WinKill, Calculator