I am trying to click on a checkbox, SetCheckBox doesn't work in this case (its a Java application), so I have been using FindImagePos. It finds the image fine, and I get the position of the top left of the image as X_0,Y_0, just as in the example. MouseMove>X_0,Y_0 works fine. I want to add an offset to X_0,Y_0, to click the checkbox, but whatever I do I get an error message complaining that the parameters to MouseMove are non-numberic. I think I've tried most combinations ! I'm sure its really simple, but how can I do:
FindImagePos>monday_en.bmp,select.bmp,0,0,X,Y,NumFound
If>NumFound>0
Let>clk_x = X_0 + 10
Let>clk_y = Y_10 +10
Mousemove>clk_x,clk_y
Using FindImagePos and MouseMove, but with an offset
Moderators: Dorian (MJT support), JRL
-
- Newbie
- Posts: 1
- Joined: Sat Mar 01, 2008 6:46 pm
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Remove the spaces (unless you are using the IGNORESPACES directive):
Also, you can tell FindImagePos to return the centre point of the matching location:
FindImagePos>monday_en.bmp,select.bmp,0,1,X,Y,NumFound
Code: Select all
FindImagePos>monday_en.bmp,select.bmp,0,0,X,Y,NumFound
If>NumFound>0
Let>clk_x=X_0+10
Let>clk_y=Y_10+0
Mousemove>clk_x,clk_y
Endif
FindImagePos>monday_en.bmp,select.bmp,0,1,X,Y,NumFound
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?