Re: Getting a handle to an external window / message box
- Posted by Mark Brown <mabrown at SENET.COM.AU> Jan 07, 2002
- 380 views
Thanks Thomas! Just tried the window handle code and it works perfectly. I also tried the SendKeys example and it will do very nicely. Together, they will do exactly what I needed :) Even I should be able to get this working in short order now..... All the best, Mark ----- Original Message ----- From: "Thomas Parslow (PatRat)" <patrat at rat-software.com> To: "EUforum" <EUforum at topica.com> Sent: Tuesday, January 08, 2002 1:53 AM Subject: Re: Getting a handle to an external window / message box > > > Hi everyone, > > Hi! > > > I am attempting to get around some of the deficiencies of the > > software that is used at my workplace. As I am just a storeman there > > is no way that I will be allowed access to the code to "fix" it > > (where it should have been fixed in the first place!) so I am forced > > to do the job externally. > > > > The software in question requires large amounts of repetitive data > > entry (for example, a unique number followed by 3 presses of the > > "tab" key and then 4 presses of "enter"....over and over again). > > > > I have had some success replacing the keypresses with a hotkey/macro > > utility (downloaded from web). However the next phase is going to > > require programming. Specifically, I need to get information > > regarding the feedback given by the application to the user via a > > message box. I am thinking that I need to get a handle to the window > > / message box. Is there a way I can get at the message box of an > > external app from my own program? > > I've written some routines for finding window handles based on their > captions (or for finding the current foreground window), you can get > them here: > > http://www.rat-software.com/projects.html#window > > > Is there a way that I can get at the type of message box that is > > used at any given moment. Such info would be sufficient to do the > > job I need. > > > > Also, does anyone know of any code ( C would be OK ) which shows how > > to send keyboard events to an external app? It would be nice to > > integrate the sort of features found in the utility I am using, into > > my program. > > Also on the same page I have a clone of VBs Sendkeys procedure which > allows you to simulate keystrokes programmatically: > > http://www.rat-software.com/projects.html#sendkeys > > > Sorry for the long mail. > > > > Happy New Year to all !! > > Happy New Year :) > > > Mark > > Thomas Parslow (PatRat) ICQ #:26359483 > Rat Software > http://www.rat-software.com/ > Please leave quoted text in place when replying > > > >