java.awt.Robot equivalent?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christopher Koppler

    java.awt.Robot equivalent?

    I need to simulate mouseclicks (in Win2K) in another application's
    window. Googling threw up java.awt.Robot, and a bit of trial and error
    showed that it could do what I needed (simulate a mouseclick on an
    open window). However, I don't want to use Java (or Jython) if I can
    avoid it, as I already have a Python 2.3 app, which works quite
    nicely, thank you, and which needs to click into a foreign window.

    Is this capability available in any of the GUI toolkits (searching
    Tkinter docs brought up nothing)? Is there a C library that I could
    wrap? Or maybe I just need to use the Windows extensions. But if so,
    how - I don't have the slightest idea how that would work.

    Anyone have any pointers?


    --
    Christopher
  • Fredrik Lundh

    #2
    Re: java.awt.Robot equivalent?

    Christopher Koppler wrote:
    [color=blue]
    > Is this capability available in any of the GUI toolkits (searching
    > Tkinter docs brought up nothing)? Is there a C library that I could
    > wrap? Or maybe I just need to use the Windows extensions. But if so,
    > how - I don't have the slightest idea how that would work.
    >
    > Anyone have any pointers?[/color]

    win32api's PostMessage might be useful. random google link:



    </F>




    Comment

    • Thomas Heller

      #3
      Re: java.awt.Robot equivalent?

      "Fredrik Lundh" <fredrik@python ware.com> writes:
      [color=blue]
      > Christopher Koppler wrote:
      >[color=green]
      >> Is this capability available in any of the GUI toolkits (searching
      >> Tkinter docs brought up nothing)? Is there a C library that I could
      >> wrap? Or maybe I just need to use the Windows extensions. But if so,
      >> how - I don't have the slightest idea how that would work.
      >>
      >> Anyone have any pointers?[/color]
      >
      > win32api's PostMessage might be useful. random google link:
      >
      > http://mail.python.org/pipermail/pyt...er/000635.html[/color]

      Other random resources:

      Simon Brunning has written a 3-part details blog entry on
      'automating the win32 gui'.

      And there's a library named 'autoit' which can be driven by com.

      Thomas

      Comment

      • Christopher Koppler

        #4
        Re: java.awt.Robot equivalent?

        On Fri, 12 Dec 2003 14:36:55 +0100, Thomas Heller <theller@python .net>
        wrote:
        [color=blue]
        >"Fredrik Lundh" <fredrik@python ware.com> writes:
        >[color=green]
        >> Christopher Koppler wrote:
        >>[color=darkred]
        >>> Is this capability available in any of the GUI toolkits (searching
        >>> Tkinter docs brought up nothing)? Is there a C library that I could
        >>> wrap? Or maybe I just need to use the Windows extensions. But if so,
        >>> how - I don't have the slightest idea how that would work.
        >>>
        >>> Anyone have any pointers?[/color]
        >>
        >> win32api's PostMessage might be useful. random google link:
        >>
        >> http://mail.python.org/pipermail/pyt...er/000635.html[/color]
        >
        >Other random resources:
        >
        >Simon Brunning has written a 3-part details blog entry on
        >'automating the win32 gui'.
        >
        >And there's a library named 'autoit' which can be driven by com.
        >[/color]

        <accent type="fake Finnish rock'n'roll">
        Thank you very many, Fredrik, Thomas!
        </accent>

        Autoit does exactly what I need (click on a specific coordinate in a
        canvas-like window), and finally a reason to learn to use ctypes,
        too...


        --
        Christopher

        Comment

        Working...