AHK-連續偵圖-腳本

2023/06/03閱讀時間約 2 分鐘
^+i::
A_ImagePath := A_ScriptDir "\image001.png"
B_ImagePath := A_ScriptDir "\image003.png"
C_ImagePath := A_ScriptDir "\image005.png"
A_Found := ImageSearch(A_ImagePath)
B_Found := ImageSearch(B_ImagePath)
C_Found := ImageSearch(C_ImagePath)
if (A_Found && B_Found && C_Found) {
MsgBox, OK
}
else if (!FileExist(A_ImagePath) || !FileExist(B_ImagePath) || !FileExist(C_ImagePath)) {
MsgBox, 沒有偵測到來源圖片
}
else if (!A_Found || !B_Found || !C_Found) {
MsgBox, 沒有偵測到圖片
}
return
ImageSearch(imagePath) {
CoordMode, Pixel, Screen
; CoordMode, Mouse, Screen
; CoordMode, Pixel, window
; CoordMode, Mouse, window
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, %imagePath%
return (ErrorLevel == "0")
}
Great
Great
留言0
查看全部
發表第一個留言支持創作者!