// 設定對比圖片路徑
UserVar picPath = "Attachment:\1.bmp" "對比圖片路徑"
// 設定聲音文件路徑
UserVar soundPath = "D:\Program Files (x86)\按鍵精靈\y1690.wav" "聲音文件路徑"
// 設定循環次數
UserVar loopCount = 0 "循環次數"
// 設定兩次點擊的時間間隔(毫秒)
UserVar interval = 5000 "兩次點擊的時間間隔(毫秒)"
While (true)
// 查找對比圖片
FindPic 343, 487, 374, 517, picPath, 0.8, intX, intY
// 如果對比圖片不同,播放聲音並停止腳本
If intX > 0 And intY > 0 Then
FileOpen(soundPath)
Exit
End If
// 點擊坐標為(1040, 148)
MoveTo 1040, 148
LeftClick 1
// 循環次數累加
loopCount = loopCount + 1
// 延時
Delay interval
Wend