From: James L. <jl...@bi...> - 2002-07-05 15:59:22
|
Hi Marcus, There are two 32-bit Windows API functions to get a window by name, called FindWindow and FindWindowEx, both in user32.dll. FindWindow takes the windows class name (blank to ignore class), and the title of the window to look for. FindWindowEx takes more parameters, allowing you to search under a top window, and iterate through child windows. In order to use them, you will need use Win32::API, I think. In order to then paste to Notepad, you will have to activate the window, and send keystrokes to it (i.e. <CTRL>V, or <ALT> E P ). At least this is what I had to do several years ago when I was VB programming. There may be an easier mechanism nowadays. Hope this helps - if you want more info, let me know James ----- Original Message ----- From: "Marcus" <li...@wo...> To: <wxp...@li...> Sent: 05 July 2002 13:34 Subject: [wxperl-users] Get Window by name > Does anybody know how to get a window by name? > > I'm working on the following: I have a dialog which collects user input > which needs to be pasted to an application of the user's choice. I > think I need to get the Window by name, e.g. "Notepad", or "Some > application", then copy and paste via the clipboard. To paste I need to > make the application's window active. > > Any ideas if there's a way in Perl? > > Thanks, > > Marcus > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Bringing you mounds of caffeinated joy. > http://thinkgeek.com/sf > _______________________________________________ > wxperl-users mailing list > wxp...@li... > https://lists.sourceforge.net/lists/listinfo/wxperl-users |