in reply to Re: Re: Don't block
in thread Win32::GUITest to run with System()
So how do I exit from system($item) then? Thanks again Blackadder#! c:\perl\bin $|++; use strict; use Win32; use Win32::GuiTest qw(:ALL :SW); use vars qw /%data/; $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"; #my @windows = FindWindowLike(0, 'GO'); # for my $win (@windows) # { # print "Found window $win with title '", GetWindowText($wi +n), "'\n"; # my @children = GetChildWindows($win); # for my $child (@children) # { # my $text = GetWindowText($child); # # next if ($text =~ /^\xff/); # you've found the icon # #next if ($text =~ /^OK|Cancel|Abort|Retry|Ignore|Yes +|No$/); # you've found a button # print "Found child $child with text '$text'\n"; # } # } system ($item); system qw [cmd.exe /c start $item]; Win32::AbortSystemShutdown($data{host}); print "\nDone\n"; }
|
|---|