I'm trying to write a wx GUI that will simplify using another (non-
python) GUI, by using simple automation
of repetitive keystrokes & mouse clicks.
The target GUI has 16 boxes (small windows within the main window)
displayed. Each of those 16 windows represents a unique hardware
port.
In order to do anything with those windows (ports), you must select
one or more with the mouse. Selected windows are displayed with a
highlighted are around that window. Selecting multiple windows is done
by pressing control, then clicking the mouse in each of the desired
windows.
Once the targets are selected (designated to be used), the remaining
actions involve clicking on buttons on the button bar.
Most of the time, the same actions will be performed to all selected
windows. So doing these actions 16 times can be tedious.
I know how to write a wxGui, but what I don't know who to do are
these ..
1. How does my wxGUI find (get a handle) the target application to be
automated?
2. How do I send keystrokes & mouse clicks to that application?
3. How do I specify sub sections (the 1 or more of the 16 small
windows) of the main window in the target application?
I've seen examples of many applications on the Wiki and other pages,
but not anything related to automating other guis.
···
--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
Automating other GUIs is a pain and error-prone. You didn't say which
OS you're targeting, but I've done a little of this on Windows so I'll
give you an idea of how to do it there. You need the PyWin32 package
and probably SendKeys. Here are the links:
http://www.rutherfurd.net/python/sendkeys/
http://www.rutherfurd.net/python/sendkeys/
Then you usually want something like the Spy tool from Visual Studio
to find out what the various window object handles are called. Once
you've got that all done, you get to play with PyWin32 methods like
"win32gui.EnumWindows" and "win32gui.GetWindowText". You'll probably
end up needing help, so be sure to join the PyWin32 mailing list if
you're targeting Windows. If you're targeting another OS, then you'll
need to ask on the appropriate list for help.
···
On Apr 8, 4:52 pm, cappy2112 <cappy2...@gmail.com> wrote:
I'm trying to write a wx GUI that will simplify using another (non-
python) GUI, by using simple automation
of repetitive keystrokes & mouse clicks.
The target GUI has 16 boxes (small windows within the main window)
displayed. Each of those 16 windows represents a unique hardware
port.
In order to do anything with those windows (ports), you must select
one or more with the mouse. Selected windows are displayed with a
highlighted are around that window. Selecting multiple windows is done
by pressing control, then clicking the mouse in each of the desired
windows.
Once the targets are selected (designated to be used), the remaining
actions involve clicking on buttons on the button bar.
Most of the time, the same actions will be performed to all selected
windows. So doing these actions 16 times can be tedious.
I know how to write a wxGui, but what I don't know who to do are
these ..
1. How does my wxGUI find (get a handle) the target application to be
automated?
2. How do I send keystrokes & mouse clicks to that application?
3. How do I specify sub sections (the 1 or more of the 16 small
windows) of the main window in the target application?
I've seen examples of many applications on the Wiki and other pages,
but not anything related to automating other guis.
-------------------
Mike Driscoll
Blog: http://blog.pythonlibrary.org
Automating other GUIs is a pain and error-prone. You didn't say which
OS you're targeting,
Windows XP.
I'm currently using this framework
which is is great at what it does, but hoping to find a mature Python
automation framework.
There are some parts of the AutoIt API that are exposed via COM so
they can be accessed from Python, but COM is its own set of headaches.
Here are the 2 references I've found to anything related to Python for
automation (for non-web applications, that is).
http://pywinauto.openqa.org/ (Requires SendKeys & Ctypes)
Unfortunately, this package threw an exception on installation.
I'll probably give this a try, even though it doesn't look as full-
featured as pywinauto
http://www.tizmoi.net/watsup/intro.html