Code: Select all
SetWorkingDir %A_ScriptDir%
SetMouseDelay, 50
Loop
{
ImageSearch, px, py, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, *10 %A_ScriptDir%\imageName.png
if ErrorLevel = 0
{
MouseMove, %px%, %py%
Sleep, 1000
MouseClick, left, px, py
Sleep, 1000
MsgBox % "Errorlevel: " . errorlevel . "`nX: " . px . "`nY: " . py
}
}
The ImageSearch works, it goes to the MsgBox which shows the right X and Y positions (comparing with the WindowSpy), but the rest doesn't. Already tried every other click/move option and still it doesn't work.
I THINK it's something with the game/application blocking the input that AK is sending, but I'm just a newbie on this so I'm not sure.
I've tried it on the game called "Bloodstone" a long time ago, and now it's "Axie Infinity" that I'm trying, with the same problem.
*Already had the same script working on other games/applications.
Anyone know what I can do?