有某项学习要求,需要在网页上看一些文章,看大概1-2分钟,页面下面有个圆形的按钮就会从灰色变成蓝色,就算完成任务,可以点击灰色的》符号,阅读下一篇文章。为此,需要人专门盯着,我采用按键精灵的脚本来自动阅读,代码如下:
FindColor 1192, 469, 1196, 470, "D8D8D8", intX, intY
While intX > 0 And intY > 0
FindColor 1207,828,1213,832,"EB880F",intX,intY
If intX > 0 And intY > 0 Then
FindColor 1192,469,1196,470,"D8D8D8",intX,intY
If intX > 0 And intY > 0 Then
MoveTo 1186, 466
LeftClick 1
End If
End If
Delay 30000
FindColor 1192, 469, 1196, 470, "D8D8D8", intX, intY
Wend
Dim a
a = 0
FindColor 1207,828,1213,832,"EB880F",intX,intY
While intX < 0 And intY < 0
a = a + 1
Delay 10000
FindColor 1207, 828, 1213, 832, "EB880F", intX, intY
Wend
If a > 0 Then
MessageBox "阅读结束"
End If