The help file says:
"ErrorLevel is set to ... 2 if there was a problem that prevented the command from conducting the search (such as failure to open the image file or a badly formatted option)."
I have a script that was working fine to automate tasks in a web-based product data management program, until we upgraded to the newest version this week. Now it's having all sorts of troubles. So I built a simple test script to see if I could further diagnose it:
Code: Select all
coordmode, screen
SetWorkingDir, C:\Users\%A_UserName%\Documents\TCAWS_MENUICONS\
#!c::
ImageSearch, thisX, thisY, 0, 1920, 0, 1280, *100 "tcaws_submit_button.png"
msgbox %errorLevel%
return
is right there in the correct directory, and it coninues to throw errorLevel 2.
What else should I be looking at?