Move the mouse back where it was before "mousemove"

472 views
Skip to first unread message

suffian amjad

unread,
Sep 5, 2010, 10:00:47 AM9/5/10
to xdotool-users
Hey All, Hope you can Help

Is there a way to move a move with mousemove command? but then return
to the original position with a command?

Jordan Sissel

unread,
Sep 5, 2010, 1:52:05 PM9/5/10
to suff...@gmail.com, xdotool-users

You can use 'xdotool getmouselocation' to get the current position. If
you're using a shell script, you could do this:

# Save the position
eval "$(xdotool getmouselocation --shell)"

# Move the mouse away
xdotool mousemove 0 0

# Restore the position
xdotool mousemove --screen $SCREEN $X $Y

-Jordan


> --
> You received this message because you are subscribed to the Google Groups "xdotool-users" group.
> To post to this group, send email to xdotoo...@googlegroups.com.
> To unsubscribe from this group, send email to xdotool-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/xdotool-users?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages