Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > controlling the mouse pointer on linux (or as vnc client)

Reply
Thread Tools

controlling the mouse pointer on linux (or as vnc client)

 
 
Gelonida
Guest
Posts: n/a
 
      08-29-2010
Hi,

>From a python script I'd like to be able to move the mouse to certain

absolute coordinates on the screen.


There's no problems calling an external program with subprocess.popen,
as I do not want to perform many movements.

The mouse can jump it doesn't have to visibly move to the target coordinate.



What would you suggest to achieve this on Linux Ubuntu 10.4?

Lateron it would be intersting to acheive the same on a Windows PC


One idea, that I had (for a cross platform solution) would be to start a
VNC server on localhost and the current display and run a small custom
VNC client, which will only control the mouse.

However I have no idea how easy it would be to use a custom VNC client
for moving the mouse.


I read about python-vnc-viewer but don't know how complex it would be to
use it as a base for 'just moving the mouse'



Thanks for any suggestions and ideas



 
Reply With Quote
 
 
 
 
John Bokma
Guest
Posts: n/a
 
      08-29-2010
Gelonida <(E-Mail Removed)> writes:

> Hi,
>
>>From a python script I'd like to be able to move the mouse to certain

> absolute coordinates on the screen.
>
>
> There's no problems calling an external program with subprocess.popen,
> as I do not want to perform many movements.


xte?

sudo apt-get install xautomation
xte 'mousemove 200 200'

see: http://linux.die.net/man/1/xte

--
John Bokma j3b

Blog: http://johnbokma.com/ Facebook: http://www.facebook.com/j.j.j.bokma
Freelance Perl & Python Development: http://castleamber.com/
 
Reply With Quote
 
 
 
 
Gelonida
Guest
Posts: n/a
 
      08-29-2010
Hi John,

> Hi,
>
>>From a python script I'd like to be able to move the mouse to certain

> absolute coordinates on the screen.
>
>
> There's no problems calling an external program with subprocess.popen,
> as I do not want to perform many movements.
>
> The mouse can jump it doesn't have to visibly move to the target coordinate.
>
>
>
> What would you suggest to achieve this on Linux Ubuntu 10.4?
>
> Lateron it would be intersting to acheive the same on a Windows PC
>


On 08/29/2010 04:25 PM, John Bokma wrote:
> sudo apt-get install xautomation
> xte 'mousemove 200 200'
>


Thanks a lot.

This solution is perfect for Linux.
Exactly what I was looking for.


I guess for Windows it would be a little more complicated?


bye


G




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Heres a mouse theres a mouse what a mouse do? unholy Gaming 37 09-17-2006 08:59 AM
Linux Mandrake> VNC server settings? John Jay Smith Computer Support 17 02-26-2006 05:56 AM
Change of mouse pointer is only visible if I move the mouse Stefan Mueller Javascript 0 01-28-2006 06:41 PM
Pointer-to-pointer-to-pointer question masood.iqbal@lycos.com C Programming 10 02-04-2005 02:57 AM
controlling another application via VBA or javascript code in Excell & sending keystrokes & mouse clicks Zaidan Javascript 1 06-09-2004 11:18 AM



Advertisments