在没有显式Sleep()语句的情况下降低AutoIt的速度 [英] Slow down AutoIt without explicit Sleep() statements

查看:428
本文介绍了在没有显式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?

推荐答案

可以通过 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.

示例:

AutoItSetOption("MouseClickDownDelay", 200)  ; Unit: ms. "Alters the length a click is held
                                             ; down before release."

AutoItSetOption("SendKeyDelay", 100)  ; Unit: ms.  "Alters the length of the brief pause in
                                      ;            between sent keystrokes. A value of 0 removes
                                      ;            the delay completely."

这篇关于在没有显式Sleep()语句的情况下降低AutoIt的速度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆