Category: | GUI Programming |
Author/Contact Info | Jay Madigan (PERLscienceman) <perlsciman@hotmail.com> |
Description: | Have you ever wanted to run a Perl/Tk Script on Win32 without that pesky DOS window? This is the script. I found this in O'Reilly's Perl Cookbook, 1st Edition; Section 15.17, pp544-545. With a little tweak (their was an apparent typo in the book which caused it initially not to work). This script allows for an associated process, in this case, yourTKscript.pl, to run without a DOS window. I found this script to be quite useful. |
#!/usr/bin/perl -w use strict; use Win32; use Win32::Process; # Create the process object. Win32::Process::Create($Win32::Process::Create::ProcessObj, "C:\\perl\\bin\\Perl.exe", # Where Perl is located. "perl c:\\yourdir\\yourTKscript.pl", # 0, # Don't Inherit DETACHED_PROCESS, # ".") or # current directory die print_error(); # sub print_error(){ # return Win32::FormatMessage(Win32::GetLastError() ); } $Win32::Process::Create::ProcessObj -> Resume(); |
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Win32::Start Perl/Tk Script Without Annoying DOS Window
by jsprat (Curate) on Jul 04, 2003 at 02:18 UTC | |
by PERLscienceman (Curate) on Jul 04, 2003 at 15:14 UTC | |
by Anonymous Monk on Aug 14, 2003 at 19:07 UTC | |
| |
Re: Win32::Start Perl/Tk Script Without Annoying DOS Window
by Anonymous Monk on Jan 24, 2006 at 01:36 UTC | |
by Anonymous Monk on Sep 22, 2010 at 02:48 UTC | |
by Anonymous Monk on Sep 22, 2010 at 02:51 UTC | |
by bcarroll (Pilgrim) on Jul 03, 2014 at 05:07 UTC |
Back to
Code Catacombs