Simple and easy to create out of process, look at Win32::Process and using the Win32::GUI library to get the handle to the desktop "window". I use this in a PerlSvc (activestate Perl Dev Kit) to spawn my automated system metrics recording and virus/spyware scans. Any event can trigger the calling of script by this method, (a)synchronous from the perl script that you have controlling any given action.

# required modules
use Win32::GUI;
use Win32::Process ('STILL_ACTIVE');

sub PERL_PATH(){ return "c:/perl/bin/perl.exe"};

# get the desktop "window" handle
my $hDesktop = Win32::GUI::GetDesktopWindow();

# fire up a subprocess that is a child to the desktop (aka explorer.exe, and appears as any standard program)
my $child_perl_script;
Win32::Process::Create( $child_perl_script, PERL_PATH, "[standard perl.exe command line arguments]",
0, 0, cwd() );

# wait for process..?? [optional]

# get the exit code [will return STILL_ACTIVE if not complete)
my $exit_code;
$child_perl_script->GetExitCode( $exit_code );
if( $exit_code == STILL_ACTIVE ){
    print "child script still running... I'll leave it be a while...\n";
    print "child script exited with $exit_code\n";

Enjoy the wonders of perl on win32 :p

Jason P.

mike morrison wrote:
I am a new Perl programmer and I have just discovered the win32::api interface.  I think it is really cool.  I have written a plain Jane  menu script in Perl that executes on the command line but I would like to Gui-ize it to make it more user friendly for my W-intel techs.  How can I call other scripts from the menu items in the MDI form or  is there a way I can use form objects for input then use them for running a script in the background?

------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash

_______________________________________________ Perl-Win32-GUI-Users mailing list

No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.9/719 - Release Date: 3/12/2007 8:41 AM