How can I move mouse to X, Y values in screen, and also to X,Y values relative to the current mouse position?

Asked by eduardobedoya

How can I move mouse to X, Y values in screen, and also to X,Y values relative to the current mouse position?
I really would like to avoid using images, cuz in this case images change all time, but the size of the box is always the same.
I have tried...
Env.getMouseLocation(838,670)
and
hover(838,670)
with no result.

Thanks Advanced.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

what about looking at the docs?
Region methods.

Env.getMouseLocation()

Env.getMouseLocation(838,670) does not make any sense ;-)

Revision history for this message
RaiMan (raimund-hocke) said :
#2

hover(x, y) should work

Revision history for this message
eduardobedoya (gonnabdh) said :
#4

Yes, I read before
I tried this...
hover(1000, 1000)
but I got the error...
[error] TypeError ( hover(): expected 0-1 args; got 2 )
x,y coordinates are inside screen resolution
What Im doing wrong?
What about move mouse relative to curren(initial) mouse position

Thanks Advanced.

Revision history for this message
Best RaiMan (raimund-hocke) said :
#5

looking into the docs really helps

Revision history for this message
eduardobedoya (gonnabdh) said :
#7

Sorry already solved
is mouseMove(x, y)
I was trying hover (x, y)

Revision history for this message
eduardobedoya (gonnabdh) said :
#8

Thanks RaiMan, that solved my question.

Revision history for this message
RaiMan (raimund-hocke) said :
#9

You should go back to the docs and read again thoroughly.

It is vital for all these functions to understand, what can be given as parameter (docs say PSMRL which is told in detail for the Region class).

Revision history for this message
eduardobedoya (gonnabdh) said :
#10

Yes, thanks Raiman
The Region Part of the docs
Pattern
String
Match
Region
Location
Thanks Again