在没有显式 Sleep() 语句的情况下减慢 AutoIt 的速度
我正在尝试探索 AutoIt 的自动化。有没有办法增加执行时间(等待)而不是在每个语法/命令之后使用 Sleep(3000) ?
I am trying to explore AutoIt for automation. Is there a way to increase execution time (wait) rather than use Sleep(3000) after each syntax/command?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
按键和鼠标单击之间的间隔可以通过 AutoItSetOption 设置,参数分别为“MouseClickDownDelay”和“SendKeyDelay”。这将导致脚本总体速度减慢,而不需要
Sleep
语句。样本:
The interval between key presses and mouse clicks can be set with AutoItSetOption, with parameters "MouseClickDownDelay" and "SendKeyDelay", respectively. This will cause a general slowdown of the script without requiring
Sleep
statements.Sample:
Sleep()
函数暂停脚本执行。当您说“增加执行时间”时,听起来像是您在等待某些事情,而不仅仅是尝试暂停脚本。查看 AutoIt 帮助中的以下函数:
ProcessWait()
RunWait()
ShellExecuteWait()
WinWait()
WinWaitActivate()
WinWaitClose()
WinWaitDelay
(这是一个选项,不是函数)WinWaitNotActive( )
也许其中之一会帮助您完成您想要做的事情。
The
Sleep()
function pauses script execution. When you say "increase execution time", it sounds like you are waiting on something instead of just trying to pause the script.Check out the following functions in the AutoIt help:
ProcessWait()
RunWait()
ShellExecuteWait()
WinWait()
WinWaitActivate()
WinWaitClose()
WinWaitDelay
(this is an option, not a function)WinWaitNotActive()
Maybe one of these will help you with what you're trying to do.