How to just shake the mouse

Asked by guojianjuan

How to just shake the mouse without clicking any objects or performing some other actions?

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Eugene S (shragovich) said :
#1

You can find the information regarding low-level mouse actions in the docs, specifically here:
http://doc.sikuli.org/region.html#Region.mouseMov

For a simple "shake", you can do this:

loc = Location(Env.getMouseLocation())
loc1 = loc.offset(50,50)
for i in range(2):
 mouseMove(loc1)
 mouseMove(loc)

Revision history for this message
guojianjuan (guojianjuan) said :
#2

Thank you very much~
I'll have a try

Can you help with this problem?

Provide an answer of your own, or ask guojianjuan for more information if necessary.

To post a message you must log in.