Тема: AHK: Помогите найти ошибку.
F1::
Send (e)
SetTimer, DoCatch, 100
return
DoCatch(){
if ImageCheck("catch") >0{
FindKey()
}Else(
sleep 5000
Send {e}
}
}
FindKey()
{
if ImageCheck("f") > 0{
if ImageCheck("g") > 0{
if ImageCheck("j") > 0{
imageCheck ("k")
Send {k}
}else
Send {j}
}else
Send {g}
}else
Send {f}
}
ImageCheck(key)
{
WinGetPos, WinX, WinY,Width, Height, A
Width := Width + WinX
Height := Height + WinY
path := % A_ScriptDir . "\" . key . ".png"
ImageSearch, ImageX, ImageY, WinX, WinY, Widht, Height, *50 %path%
}
F2::
ExitApp