how do I properly increment the X & Y arrays in the script below?
FindImagePos>Check_button.bmp,mypic.bmp,20,1,X_array,Y_array,imgs
If>imgs>0
let>j=0
repeat>j
Let>xx=%X_array_j%+x
Let>yy=%Y_array_j%+y
MouseMove>xx,yy
LClick
add>j,1
Until>j>imgs
Endif
Increment arrays in findimagepos
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Just use the loop counter:
Code: Select all
FindImagePos>Check_button.bmp,mypic.bmp,20,1,X_array,Y_array,imgs
If>imgs>0
let>j=0
repeat>j
Let>xx=X_array_%j%
Let>yy=Y_array_%j%
MouseMove>xx,yy
LClick
add>j,1
Until>j=imgs
Endif
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Yep you're so close! :]
Let>xx=X_array_%j%
Let>yy=Y_array_%j%
MouseMove>%xx%,%yy%
Also - you might want to change your Until to say;
Until>j=imgs
(when imgs=4, the largest x is X_array_3)
However, the above doesn't work when Let>VAREXPLICIT=1 ... (so maybe Marcus can re-explain how to do that one. :] )
[Edit: Magic, Marcus posted the same info 3 minutes before I did!]
Let>xx=X_array_%j%
Let>yy=Y_array_%j%
MouseMove>%xx%,%yy%
Also - you might want to change your Until to say;
Until>j=imgs
(when imgs=4, the largest x is X_array_3)
However, the above doesn't work when Let>VAREXPLICIT=1 ... (so maybe Marcus can re-explain how to do that one. :] )
[Edit: Magic, Marcus posted the same info 3 minutes before I did!]