In article <mailman.988395882.14126.python-list at python.org>, optopianet at netscape.net writes >I'm attempting to programmatically drive an application window from Python, much >like "macro recorder" or automated testing software. > >Has this been done? I haven't found anything obvious. > >Using win32ui, win32gui, PyCWnd and others, I can locate the application window >(EnumWindows), maximize it (ShowWindow), and bring it to the fore >(BringWindowToTop). > >At the moment, I'm stumped as to how to activate menus. >I'd like to have the menus pop up and have each item highlighted in turn until >the desired selection, which is then activated. > >Do I use spy to capture the "messages" and try to replicate the behaviour using >SendMessage? >Is there a better way? > > thanks, > - gordon ... many applications can be controlled from the keyboard using short cut key combos. If you can do that with your app then perhaps you could try and emulate something like the sendkeys statement of vba. Certainly spy recording is possible, but there are a lot of events and you would need to know how to force say a mouse button push to a particular button/menu. -- Robin Becker
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4