473,383 Members | 1,874 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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
Jul 18 '05 #1
3 4643
Christopher Koppler wrote:
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?


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

http://mail.python.org/pipermail/pyt...er/000635.html

</F>


Jul 18 '05 #2
"Fredrik Lundh" <fr*****@pythonware.com> writes:
Christopher Koppler wrote:
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?


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

http://mail.python.org/pipermail/pyt...er/000635.html


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
Jul 18 '05 #3
On Fri, 12 Dec 2003 14:36:55 +0100, Thomas Heller <th*****@python.net>
wrote:
"Fredrik Lundh" <fr*****@pythonware.com> writes:
Christopher Koppler wrote:
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?


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

http://mail.python.org/pipermail/pyt...er/000635.html


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.


<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
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Adrian Lumsden | last post by:
Hello, I have an app where I have to screen scrape to capture an image from a JMF film player. The user is given a dialog with a list of frames that can be exported as images. If the one they...
198
by: Michael N. Christoff | last post by:
Java, the software developed by Sun Microsystems in the mid-1990s as a universal operating system for Internet applications, gave NASA a low-cost and easy-to-use option for running Spirit, the...
73
by: RobertMaas | last post by:
After many years of using LISP, I'm taking a class in Java and finding the two roughly comparable in some ways and very different in other ways. Each has a decent size library of useful utilities...
5
by: Robert Oschler | last post by:
Preamble: - I know this is the Python forum - I know about (and have used) Jython I already posted this question in comp.lang.java. But after a week I have still not received a single reply....
40
by: Eitan | last post by:
Hello, I know Java-Applet (written for JBuilder). I would like to know about dotnet technology, pros and cons in comparation to Java-Applet technololgy. Can I write a program in dotnet, like...
2
by: Jops via DotNetMonster.com | last post by:
How can I move the cursor on the screen and press buttons (like a human user) programmatically? I don't know what it is called so I couldn't google but in Java it is done via Robot-class. --...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
6
by: Steven Nagy | last post by:
Hello gurus, I once had this program that interpreted a subset of the Java language to allow you to write movement and shooting patterns for a software "robot" which ran against a similarly...
3
by: Tuy Solang | last post by:
Hi Everyone, I am just starting to learn Java from O'Reilly CD. I could not find any example that is related to screen capture. Is it possible in Java like in Microsoft C? Thanks,
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.