I have to also recommend proper licensing for the application you have (presumably) agreed to use under the author's terms.
As previously mentioned, a window and a process are not the same thing. and you're really looking to control the window, not the app that generated it.
I have done some Win32 hacking along these lines, and the specific thing you're looking for is a "Window Handle", usually called (in Windows API docs) hWnd. There is a Win32 API call to find a window's handle, given its name. The title of the message window hopefully doesn't change from run to run, so you can use that to get a handle on the window. From there you have a few choices, depending on what you have Perl modules for:
1. You could send the window a 'close' message
2. You could find the handle for the (probably) only button on the window and send it a 'click' message
3. You could ask the window for its position on the screen, and then move the mouse to the appropriate offset from that position; then click the mouse. I think the Win32::CtrlGUI module mentioned above can do this.
--
Spring: Forces, Coiled Again!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.