in reply to Perl TK on Win32

Win32::Process may be your best bet, but note issues w/ it actually doing what you describe as identified at the end of TK Chatterbox Client.

HTH
--
idnopheq
Apply yourself to new problems without preparation, develop confidence in your ability to to meet situations as they arrise.

Replies are listed 'Best First'.
Re: Re: Perl TK on Win32
by HamNRye (Monk) on May 11, 2001 at 03:06 UTC

    Looked at the Chatterbox Client, and I assunme that this is the sub you are talking about:

    ###################################################################### +########## # # closeDOSParent # # Closes the dos prompt that created this process # sub closeDOSParent { # This just simply doesn't work. I'm not sure why. return; return if ($opt_debug); # debugging info goes to STDOUT! if ($^O =~ /MSWin32/i) { my($process); my($program) = $^X; $orig_params =~ s/\-c\S*\b//g; my($pgm) = "perl $0 $orig_params"; eval ' use Win32::Process; Win32::Process::Create($process,"$program","$pgm",0,DETACHED_PRO +CESS,".") || die Win32::FormatMessage(Win32::GetLastError()) . "\n"; '; exit; } }

    I'm not looking to close the DOS window that started my process, but trying to avoid the console windows popping up when doing an "rsh" from the program. They close again immediately, but having 6-7 windows popping into the foreground evey minute is a pain.

    I'll look into the Win32::Process docs and see if I can figure out anything....

      Another thought I just had while waiting for the pizza delivery man was "Can you daemon-ize it?" ... maybe Win32::Daemon is an approach, pass the service instructions, then kill the service when the app closes?

      I have no real idea if this will even work, but my blood sugar is low ...

      HTH
      --
      idnopheq
      Apply yourself to new problems without preparation, develop confidence in your ability to to meet situations as they arrise.

      I'm not looking to close the DOS window that started my process

      All this command does is hide the DOS window that $pgm is spawning (so launch rsh with that type of command). Look around on the site, there have been many other questions WRT the same thing, including my own - I have used this solution and it works.