The problem is that the pop up window is almost certainly not a separate application (or process), but an integral part of the same application. If you were to detect the process id/handle for the task controlling the popup window and kill it, you would be killing the program that produces it, and your overall process would not complete correctly.

That leaves you with two options. Re-licence the application or write a program that 'clicks' the appropriate button on the popup window to cause it to be dismissed.

The former is probably the easiest solution and long term, the right one unless you can find an alternative to it that performs the same job.

The second, is more complicated, but could be done using perl. A good place to start would be Win32::CtrlGUI which will allow your script to look for the specific popup window, and then 'send' a keystroke or mouse click to it. However, working out how to determine which window to look for, and what and where to send the keystroke(s) or mouse clicks to is non-trivial and not something that anyone here could really help you with much unless they had a copy of the same application.

You'll need to read the documentation to the module quite carefully.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
Hooray!


In reply to Re: Killing an Application in Windows NT by BrowserUk
in thread Killing an Application in Windows NT by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.