AutoIt3 - 如果弹出窗口如何分支?
我正在尝试编写一个 AutoIt3 脚本来通过向导来设置程序。在某一时刻,根据计算机上已安装的内容,它可能会也可能不会弹出另一个对话框,其中显示诸如“这已经存在......您想做什么?”之类的内容。然后我会让脚本处理该对话框,然后继续。
问题是,如果没有运行两个单独的 AutoIt 脚本,我无法弄清楚如何使其在某些内容上分支如果:一个用于执行主向导设置,另一个用于监视可能的弹出窗口。
有什么建议吗?
I am trying to write an AutoIt3 script to go through a wizard to setup a program. At one point, depending on what has already been installed on the machine, it may or may not pop up another dialog saying something like "This already exists.. what would you like to do?". Then I would make the script handle that dialog and then continue.
The problem is that I can't figure out how to make it branch on something if it pops up without having two separate AutoIt scripts running: one to do the main wizard setup, and one to watch for the possible popup.
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您知道在设置中的哪个位置弹出对话框,您可以尝试以下操作:通过向导移动到此位置后,WinWait 用于该对话框。如果 WinWait 返回没有成功,则该对话框可能没有弹出。
If you know where in the setup the dialog pops up, you can try this: after you move through the wizard to this point, WinWait for the dialog. If WinWait returns without success, the dialog probably did not pop up.
如果您不知道它何时会发生(随时可能弹出的内容),您可以尝试以下操作:
从帮助文件中:
If you don't know when it will happen (something that could pop up at any time) you could try this:
From the help file: