#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. CoordMode, Pixel, Relative ; Interprets the coordinates below as relative to the screen rather than the active window. ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, NTlogo.bmp if ErrorLevel = 2 MsgBox Could not conduct the search. else if ErrorLevel = 1 MsgBox Image could not be found on the screen. else MsgBox The icon was found at %FoundX%x%FoundY%.
I have taken a screenshot of a logo and saved it to a .bmp, then I load the bmp in Windows Photo Viewer so that it is visible on the screen. When I run the script, I get the ErrorLevel 1.
I have tried adding more shades of variation with the same result. :?