自动热键循环的奇怪行为

时间:2019-07-12 08:36:14

标签: loops sequence autohotkey

我正在尝试使用autohotkey做一个非常简单的事情:

  • 重新加载浏览器窗口
  • 等待5秒
  • 向下滑动鼠标滚轮6次
  • 等待15分钟
  • 重复

我尝试的脚本是:

#Persistent
Loop,
{
Send {F5}
Sleep, 5000
Send, {WheelDown 6}
Sleep 900000
}

但是由于某种原因,它无法正常工作。 在发送WheelDown并立即重新加载(发送F5)之后,它似乎等待。 我试图将序列更改为无效。

能否请您告知可能出问题的地方?

谢谢!

1 个答案:

答案 0 :(得分:-1)

根据我的评论

#Persistent
Loop,
{
WinActivate, Your Window Title ; optional, but good practice
Sleep, 250
Send, {F5}
Sleep, 5000
Send, {Click 100, 200, 0} ; adjust the position so over the window
Send, {WheelDown 6}
; Or substitute the prior two lines with (remove the first ;)
; Send, {Down 18} ; adjust the number of lines
Sleep, 900000
}

Hth