指定窗口下激活脚本的使用方法集合
; 例 1
IfWinExist, Untitled - Notepad
{
WinActivate ; 自动使用上面找到的窗口.
WinMaximize ; 同上
Send, Some text.{Enter}
return
}
; 例 2
IfWinNotExist, Calculator
return
else
{
WinActivate ; 前面的"IfWinNotExist"也设置了上次找到的窗口.
WinMove, 40, 40 ; 把它移动到新位置.
return
}
; 例 3
if WinExist("ahk_class Notepad") or WinExist("ahk_class" . ClassName)
WinActivate ; 使用最近找到的窗口.
MsgBox % "The active window's ID is " . WinExist("A")
; 例 4: 等同于 IfWinNotExist, Calculator
If !WinExist("Calculator")
return
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

