in reply to Don't block
in thread Win32::GUITest to run with System()

How do I exit immediatley?

If I exit immediatly from system then will the pop up still appear?

I even more lost now.

Blackadder

Replies are listed 'Best First'.
Re: Re: Don't block
by PodMaster (Abbot) on May 14, 2004 at 12:59 UTC
    *cough*
    print "starting notepad, blocking, you must close it to continue$/"; system 'notepad.exe'; print "closed notepad, great$/starting notepad again, no blocking$/"; system qw[ cmd.exe /c start notepad ]; print "look, notepad still open, and I'm exiting$/";
    update: or in a more perl way system $^X,  -e => "exec(notepad)"

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      OK,..Thnaks,...This is what I have done and still not there yet!
      #! 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"; }
      So how do I exit from system($item) then? Thanks again Blackadder
    A reply falls below the community's threshold of quality. You may see it by logging in.