ImageSearch errorLevel 2 question
Posted: 06 Dec 2023, 15:37
What are some of the reasons that ImageSearch might throw errorLevel 2?
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:
C:\Users\<username redacted>\Documents\TCAWS_MENUICONS\tcaws_submit_button.png
is right there in the correct directory, and it coninues to throw errorLevel 2.
What else should I be looking at?
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?