AHK:对话框的自动化

AHK: Automation of dialog boxes

如何自动弹出对话框,有时对话框会出现多次,如果对话框自动出现,请按确定或回车。 有没有办法使用 AHK 脚本实现对话框自动化?

我使用了以下脚本

while WinActive("Convert Properties")
{
Send, {ENTER}
sleep 600
}

确保使用 window 间谍实用程序从您的 autohotkey 安装文件夹中获取 window 标题。

windowTitle = Convert Properties

;Call CloseWindow periodically passing the windowTitle as argument:
CloseWindowWithBoundArgument := Func("CloseWindow").bind(windowTitle)
SetTimer, %CloseWindowWithBoundArgument%

;Wait for a window to exist, then close it:
CloseWindow(winTitle) {
    WinWait, %winTitle%, %winText%   ; wait until the window exists
    WinClose, %winTitle%, %winText%  ; close it
}

For a more detailed answer click here.