當前位置:編程學習大全網 - 網站源碼 - 幫助修改按鍵精靈腳本?

幫助修改按鍵精靈腳本?

以下是修改後的按鍵精靈腳本,實現了循環點擊坐標1040,148,並根據對比圖片1.bmp的不同打開文件或繼續循環:

// 設定對比圖片路徑

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

  • 上一篇:關於win7家庭普通版IE瀏覽器的自動填表功能問題
  • 下一篇:PHP查詢語句,如何返回總記錄數
  • copyright 2024編程學習大全網