Mouse click to accept dynamic coordinates

Thanks a ton @Lera That worked, but now I am running into another issue.
MouseInfo seems to be a missing property- although I know it exists in Java. Any suggestions? I am trying to get the x-coordinate of my mouse position.

@SaurabNair, please add in the beginning of script import java.awt.*

I tested and it works on my side:


Thanks a ton @Lera! Just one further question- how would I know when to import explicitly?

Also, I am now trying to use the stored X and Y coordinates as a future mouse click. The X and Y positions are recording perfectly.mousePos
I then tried using the code below:

but it is resulting in the error below.
Could you tell me what I need to do?

Welcome :blush:. As about explicitly, as I know without adding import, only base functionality will work. So if you’re going to use some Java classes, it would be better to add necessary class or namespace to import section.

1 Like

@Lera, @alasbleis, @ashapkina- Would you be able to help me with the error when I try to use the recorded number as a future mouse click? Description in my previous comment. Thank you!

@SaurabNair try converting the number to a string first and then click.
See an example in this script. (771 Bytes)


Awesome @ashapkina! Thank you!
Just for my understanding, why do I have to make a string a string again in the function? I was assuming since the expression had already made it into a string, a further .toString was not needed.

RString is a Recorder String, specific to RPA Recorder, and .toString converts it to a Java String.

1 Like