hey all,

i am using Win32::GuiTest to do some automation for a third party application.

within the perl script, i run the third-party app, and use Win32::GuiTest to click a few options and fill in some fields, and then click a "process" button in the third-party app, which process some data for a good 8 minutes.

once that data is finished processing a message box pops up that says, "complete".

my question is, how can i make my perl script wait for that message box to pop up, and when it does grab focus to that and click "OK"?

i tried putting a while loop to wait for it, but doing so slows my computer down to a crawl, and perl takes 99% cpu usage...

typically without waiting for the msg box, the perl script will terminate once it click the "process" button, but i need it to like go to sleep or something, until the msg box appears.

any thoughts?

thanks monks


In reply to Win32::GuiTest waiting for a window by primus

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.