Try something like the following.
If it does not work, start with just a two-line script. In the first line, do an ImageSearch that you believe will work. Hard-code the coordinates in your test. In the second line, display the ErrorLevel from the search. If you get an ErrorLevel of 2, specify the full path to your image, and re-test. If your ErrorLevel is 1, then the image was not found, and you can backtrack to determine why.
A demonstration is below. What do you think the MsgBox will show?
Code: Select all
x = 10
; x += 5
%x% += 5
MsgBox, % x
In most circumstances, assignment of variables does not use
% on the left side. Using
% around variable names in numeric command parameters is optional. For an assignment there, you would omit
%.