Yep, I think this will work, however not sure how!

This is the code that I have done so far
#! c:\perl\bin $|++; use strict; use Win32; use Win32::GuiTest qw(FindWindowLike GetWindowText SetForegroundWindow + SendKeys); use vars qw /%data/; $Win32::GuiTest::debug = 0; # Set to "1" to enable verbose mode $data{apps_list} = shift @ARGV; $data{host} = Win32::NodeName(); system (cls); print "\nThis machine is ". $data{host}; print "\n\nPath to apps list => ". $data{apps_list}."\n"; open (LST, "$data{apps_list}") || die "$! : File was not found\n"; chomp (@{$data{Go_scripts}} = <LST>); for my $item (@{$data{Go_scripts}}) { print "\n$item\n"; system ($item); my @win =FindWindowLike(0, "^Go", ""); for (@win) { print "$_>\t'", GetWindowText($_), "'\n"; SetForegroundWindow($_); ); } #print "$^E, $!\n".Win32::FormatMessage(Win32::GetLastError()); Win32::AbortSystemShutdown($data{host}); print "\nDone\n"; }
System($item) will run the 'Go' scripts for me, I would only get a windows message box if the installation was NOT successfull. Other than that I do not get a confirmation of successfull installation. So, if the installation did not begin, then a message box appears titled GO, and starts with the string "the Go script did not start due to...."

Can someone please show me how can I detect that this window has popped up? and be able to send a mouse click to the ok button in that message box so the script can continou?

TIA

In reply to Re: Re: detecting activities of scripts by Anonymous Monk
in thread detecting activities of scripts by blackadder

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.