Move Mouse to Image Questions

Discuss RoboTask here
Post Reply
Zac
Posts: 18
Joined: Wed Feb 22, 2023 5:14 pm

Move Mouse to Image Questions

Post by Zac »

Hello,

I'm using the Move Mouse to Image Action for many parts of a task I'm creating and I had a few questions that I am confused on even after testing it for a couple of weeks.

1st: Does the Move Mouse to Image Action start from pixel x: 0 y: 0 or does it start the search from the coordinates that the image was found on and if that is the case that it does start from where the image was found, does it check from those coordinates until it gets to the last pixel on the bottom right of the screen or does it go back to the top at 0, 0 and work it's way back down until it gets back to the Start Search From coordinates?
Reason for question: the task I'm creating is based on a website that updates every few weeks to few months and it causes issues when they move things a few pixels left or right or up or down and it will return false when it's on the screen so I wasn't sure if I should move the Start Search from 0, 0 if it meant it would check the entire screen for that image to move the mouse to.

2nd: I've tested this about a month ago but I tried adding a variable to the start search from fields that would change the value of the Y axis for up and down to go down further on the page since there maybe multiple instances of the same image and I wanted to know the image position for that 2nd instance to click on it but it always only showed the first image instance's position instead of the 2nd one even when I changed the Y axis value to go lower than the first image instance.

3rd: In the Additional tab, The tolerance (2..20): x. I wanted to know how this works a bit more, if this makes the image more easily recognized by robotask but comes with the disadvantage of another image possibly being recognized instead of the correct image or if this allows the action to go on for longer to find the image on the screen and what not.

4th: For the Move Mouse to Image Action, I have a few actions that look for an image with specific word(s) on them since you can't highlight them on the page for doing clipboard actions to check them that way so I have the Move Mouse to Image to find if that specific word(s) are on the screen and return true or false if it appears or not to do something else. Is it recommended that for this example that I add some space around the word it looks for if available on the page or would it find it easier, the smaller the image is?

Thank you for taking the time to read and answer these questions!
Zac
Posts: 18
Joined: Wed Feb 22, 2023 5:14 pm

Re: Move Mouse to Image Questions

Post by Zac »

I've tested more with it and it still baffle's me because I have a table that has checkboxes that start at the same x position on the screen and just has different y positions. I created a simple task that only uses move mouse to image action and it finds the image for about 5 checkboxes but as soon as it gets to the 6th checkbox is when it can't find it anymore. I'm using the blue space that's around the checkboxes to determine which checkbox to look at so in my examples below you will see the 1st checkbox and the 6th checkbox selected individually for each PNG. It almost seems as if the Move Mouse to Image action is stopping after it's checked a certain number of pixels from it's Starting Pixel position and not checking the rest of the page for the image it needs to move the mouse to. I've also tested all available tolerance levels to see if there would be a change but nothing happened.
Attachments
example of checkboxes_6th selected.PNG
example of checkboxes_6th selected.PNG (9 KiB) Viewed 2587 times
example of checkboxes.PNG
example of checkboxes.PNG (7.28 KiB) Viewed 2587 times
Oleg
Site Admin
Posts: 3011
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Move Mouse to Image Questions

Post by Oleg »

1st: Does the Move Mouse to Image Action start from pixel x: 0 y: 0 or does it start the search from the coordinates that the image was found on and if that is the case that it does start from where the image was found, does it check from those coordinates until it gets to the last pixel on the bottom right of the screen or does it go back to the top at 0, 0 and work it's way back down until it gets back to the Start Search From coordinates?...
The action can start from any coordinates and works until it finds the desired image or processes the entire desktop. If the initial coordinates are close to the desired object, then the search is faster.
Oleg Yershov
Oleg
Site Admin
Posts: 3011
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Move Mouse to Image Questions

Post by Oleg »

2nd: I've tested this about a month ago but I tried adding a variable to the start search from fields that would change the value of the Y axis ...
The action stops when the object is found. The search proceeds in a spiral starting from the initial coordinates until it processes the entire desktop.
Oleg Yershov
Oleg
Site Admin
Posts: 3011
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Move Mouse to Image Questions

Post by Oleg »

3rd: In the Additional tab, The tolerance (2..20): x. I wanted to know how this works a bit more,...
Tolerance sets the allowed number of errors in an image search.
0 is an absolutely exact match. it doesn't make sense because the system always renders objects with some inaccuracy.
It also makes no sense to specify more than 20, because in this case the action will find the wrong object with a high probability.
I recommend setting the tolerance as low as possible.
Oleg Yershov
Oleg
Site Admin
Posts: 3011
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Move Mouse to Image Questions

Post by Oleg »

4th: For the Move Mouse to Image Action, I have a few actions that look for an image with specific word(s) on them since you...
The action does not seek words. It's looking for an image. For example: if the word is written in a different font than in the action setting, then the action will never find it on the screen.
Oleg Yershov
Zac
Posts: 18
Joined: Wed Feb 22, 2023 5:14 pm

Re: Move Mouse to Image Questions

Post by Zac »

Thank you for the help as always Oleg!!!
Post Reply