Control mouse with Python?

Discussion in 'Python' started by simo, Jul 1, 2004.

  1. simo

    simo Guest

    I'm looking to make an app to record my mouse movements and play them
    back.

    It will essentially be for unit testing websites, so I suppose it
    could be done using one of the wxPython MSIE ActiveX widgets, but I'd
    like it to work on other platforms and not just in web browsers.

    Anyone got any ideas for how this could be done?

    I guess if reading/writing mouse movements is difficult, I could limit
    it to clicking buttons or use a fixed screen resolution and absolute
    screen coordinates, but that will be very limiting I think.
     
    simo, Jul 1, 2004
    #1
    1. Advertising

  2. Pythons tend to eat mice so they don't make good mice shepherds.
     
    Daniel Dittmar, Jul 1, 2004
    #2
    1. Advertising

  3. In article <>,
    simo <> wrote:
    >I'm looking to make an app to record my mouse movements and play them
    >back.
    >
    >It will essentially be for unit testing websites, so I suppose it
    >could be done using one of the wxPython MSIE ActiveX widgets, but I'd
    >like it to work on other platforms and not just in web browsers.
    >
    >Anyone got any ideas for how this could be done?
    >
    >I guess if reading/writing mouse movements is difficult, I could limit
    >it to clicking buttons or use a fixed screen resolution and absolute
    >screen coordinates, but that will be very limiting I think.


    Common operating systems aren't friendly to this effort.
    At the least, you'll need to define your goal quite pre-
    cisely. Do you want to construct a Python program that
    monitors the mouse movement while *other* processes are
    active? That's deeply non-portable. If it's Windows that
    motivates you, <URL: http://wiki.tcl.tk/8813 > has refer-
    ences that'll help you start on the subject of
    record/playback utilities.
    --

    Cameron Laird <>
    Business: http://www.Phaseit.net
     
    Cameron Laird, Jul 1, 2004
    #3
  4. On 30 Jun 2004 22:25:56 -0700, (simo)
    declaimed the following in comp.lang.python:

    > I'm looking to make an app to record my mouse movements and play them
    > back.
    >

    Ack! I've not seen one of those since my early Amiga days, where
    one plugged into the event stream (mouse, keyboard, floppy eject/insert,
    etc.) and treated everything as a passthrough. Also how one "played
    back" -- by injecting formatted events into the stream. Had a scriptable
    event program -- came in useful for revealing the easter eggs in the OS
    (considering one of them involved something like holding down both
    left/right shift, left/right Amiga keys, left mouse button, AND
    eject/insert a disk in DF0:)

    --
    > ============================================================== <
    > | Wulfraed Dennis Lee Bieber KD6MOG <
    > | Bestiaria Support Staff <
    > ============================================================== <
    > Home Page: <http://www.dm.net/~wulfraed/> <
    > Overflow Page: <http://wlfraed.home.netcom.com/> <
     
    Dennis Lee Bieber, Jul 1, 2004
    #4
  5. simo

    simo Guest

    "Daniel Dittmar" <> wrote:

    > Pythons tend to eat mice so they don't make good mice shepherds.


    Very good.

    I've done some research and it looks like Jython may be a better bet....
     
    simo, Jul 1, 2004
    #5
    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. Davisro
    Replies:
    2
    Views:
    1,350
    Jim Corey
    Apr 23, 2004
  2. Max
    Replies:
    7
    Views:
    9,182
  3. Claus Atzenbeck
    Replies:
    1
    Views:
    1,103
    Claus Atzenbeck
    Nov 26, 2004
  4. =?Utf-8?B?am9qb2Jhcg==?=
    Replies:
    1
    Views:
    4,165
    wwwtar
    Oct 2, 2006
  5. tom arnall
    Replies:
    6
    Views:
    1,304
    Ian Shef
    Jan 18, 2007
Loading...

Share This Page