@Marcus
Good interpreting! I totally didn't get "cords". LOL!
@Newuser123
I think maybe you are asking how to do it without co-ords because you may not have realized the FindImage command gives you the co-ords.
Code: Select all
FindImagePos>%BMP_DIR%\image_1.bmp,SCREEN,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
MouseMove>XArr_0,YArr_0
LClick
Endif
If you look in the FindImage line you see XArr and YArr. These are the "cords" of the image you are looking for. More specifically, it is the Left(x), Top(y) corner of the image found on the screen.
Now all that you need to do is use these cords in the mousemove command as above. Of course you don't have to do a LClick, or mousemove. Insert whatever commands you want.
Because there may be more than one set of co-ords, the cords are in an array. The array starts at zero. As you see in the "If" statement they are referred to as XArr_0 and YArr_0. Zero is probably all you will need.
Also to be clear, when you use the wizard it gives you options of where the co-ords will be. Such as Left, Top corner. But you may also choose Center Of Image. And other options as well.
It's easier if you use the FindImage wizard. Just answer the questions. And then click "Insert Code".
Then you can modify the commands in the "If" statement as needed.
I hope this helps you. Good Luck.
Not required, but I would like to hear how your macro works out. Leave a comment here for all of us to see how it worked. Plus sharing your knowledge will help others.