I have a problem with ImageSearch... no matter what I do, it cannot detect a image on the second extended non-primary display. It works flawlessly on the main display though. I reduced the code to a basic working example that should work but doesn't. Any assistance would be highly appreciated.
Code: Select all
SetWorkingDir %A_ScriptDir%
CoordMode, ToolTip, screen
CoordMode, Mouse, screen
CoordMode, Pixel, screen
SysGet, VirtualScreenWidth, 78
SysGet, VirtualScreenHeight, 79
SysGet, VirtualScreenLeft, 76
SysGet, VirtualScreenTop, 77
ImageSearch, FoundX, FoundY, VirtualScreenLeft, VirtualScreenTop ,VirtualScreenLeft+VirtualScreenWidth, VirtualScreenTop+VirtualScreenHeight, *50 testpic.bmp
if ErrorLevel = 2
MsgBox Could not conduct the image search.
else if ErrorLevel = 1
{
MsgBox Image not found
ExitApp
Return
}
MsgBox %FoundX% %FoundY%
ExitApp
Return