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

Discussion in 'Python' started by Gelonida, Aug 29, 2010.

  1. Gelonida

    Gelonida Guest

    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
     
    Gelonida, Aug 29, 2010
    #1
    1. Advertising

  2. Gelonida

    John Bokma Guest

    Gelonida <> 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/
     
    John Bokma, Aug 29, 2010
    #2
    1. Advertising

  3. Gelonida

    Gelonida Guest

    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
     
    Gelonida, Aug 29, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWlrZQ==?=

    VNC using ASP.NEt

    =?Utf-8?B?TWlrZQ==?=, Feb 19, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    2,204
    Nick Gilbert
    Feb 19, 2004
  2. Alberto Vera

    OT: software like VNC

    Alberto Vera, May 5, 2004, in forum: Python
    Replies:
    2
    Views:
    321
    Richie Hindle
    May 5, 2004
  3. scott

    Logging VNC Hits

    scott, Oct 5, 2004, in forum: Python
    Replies:
    1
    Views:
    342
    Peter L Hansen
    Oct 6, 2004
  4. Astan Chee

    VNC capture in python

    Astan Chee, Jul 7, 2008, in forum: Python
    Replies:
    1
    Views:
    522
    Mike Driscoll
    Jul 7, 2008
  5. Stefan Mueller
    Replies:
    0
    Views:
    375
    Stefan Mueller
    Jan 28, 2006
Loading...

Share This Page