找回密码
 加入
搜索
查看: 2535|回复: 3

[AU3基础] 请问最简洁高效的隔指定时间执行一个操作的代码?

[复制链接]
发表于 2013-6-30 12:42:49 | 显示全部楼层 |阅读模式
                        While 1
                                If TimerDiff($BeginTime1) >= 2400000 Then
                                        MouseClick("left", 70, 240)
                                        $BeginTime1=TimerInit()
                                        ExitLoop
                                EndIf
                        WEnd
像以上的While循环,计算机是怎么执行的?
是每毫秒都在循环判断条件吗?

还是直接将脚本暂停sleep(2400000)更好?
发表于 2013-7-1 00:53:07 | 显示全部楼层
AdlibRegister
才是正道
发表于 2013-7-7 09:06:27 | 显示全部楼层
;AdlibRegister ;注册一个 Adlib 函数.AdlibRegister ( "函数" [, 时间] ):函数 要注册的 Adlib 函数名称;时间 [可选参数] 多长时间调用一次函数(单位为毫秒). 默认(Default)为 250 毫秒.
发表于 2013-7-7 09:21:03 | 显示全部楼层
貌似这个函数更强大~
http://msdn.microsoft.com/en-us/library/windows/desktop/ms644906(v=vs.85).aspx
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-18 13:05 , Processed in 0.075107 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表