I was/am also having this problem, but generally ignored having the
window- I can say for my part I do normally use backticks for most
things, but I use win32process when I want more control over the
process, for instance I want it to run for a certain amount of time and
then kill it. For instance a little snippet that shows a PowerPoint
slide for 15 seconds

    Win32::Process::Create($goodfile,
       "c:\\progra~1\\microsoft office\\powerpoint viewer\\PPTVIEW.EXE",
         "PPTVIEW.EXE \"$goodfile\" /s",
       0,
       NORMAL_PRIORITY_CLASS,
       ".") || die ErrorReport();
    Win32::Sleep(15000);
    {$goodfile->Kill(0)}

------------------------------
James Shuttlesworth
Network Technologies Manager
Ursinus College
Computing Services
[EMAIL PROTECTED]
 
 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Stuart Arnold
Sent: Tuesday, April 29, 2008 2:47 AM
To: 'Michael Ellery'; 'perl-win32-users'
Subject: RE: Win32::Process::Create


Not sure why you use Win32Process (I' am sure you have your reasons),
but I have scripts that launch child processes and wait for them to
terminate. I just use the backticks(``) rather than a "system" command.
The script will just hang until the child is done.

For the other thing about minimizing/hiding the console window,
Win32::GUI can do this:

use Win32::GUI; 
my $perlwin = Win32::GUI::GetPerlWindow();
Win32::GUI::Show( $perlwin, 0 ); # SW_HIDE
Win32::GUI::Show( $perlwin, 1 ); # SW_SHOWNORMAL Win32::GUI::Show(
$perlwin, 5 ); # SW_SHOW Win32::GUI::Show( $perlwin, 6 ); # SW_MINIMIZE


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Michael Ellery
Sent: Monday, April 28, 2008 3:24 PM
To: 'perl-win32-users'
Subject: Win32::Process::Create

..I use this function pretty regularly to spawn procs on windows, but 
I've often wanted to minimize the console or main window that was 
launched. Does anyone know how to do this? In the corresponding WIN32 
API, there is a STARTUPINFO structure that allows this, but looks like 
it's not part of the Win32::Process API. Advice appreciated.
-Mike Ellery
_______________________________________________
Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to