InterGuru has asked for the wisdom of the Perl Monks concerning the following question:
I first create the button.
$dialog5 = $mainWin->Dialog( -title => "About ActEudo", -buttons => [ "OK", "Buy" ], -command=>\&buyNow,);Then I write the subroutine to link to the web page.
sub buyNow{
my $but=shift; # Dialog sends button name as 1st parameter
if($but eq “Buy”){
$SIG{CHLD}='IGNORE';
my $pid=fork(); # causes perl interpeter to collapse
if ($pid){
my $cmd=`start www.interguru.com`;
exit(0);
}
}
}
use Proc::Background
my $Iexplore = 'C:\Program Files\Internet Explorer\IEXPLORE.EXE';
sub instrPage{
my $instrPage ="http://www.somethingxx.com";
my $proc1 = Proc::Background->new($Iexplore, $instrPage );
$proc1->alive;
}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Linking to Web from Tk perl
by jdporter (Paladin) on Feb 01, 2005 at 15:12 UTC | |
by InterGuru (Sexton) on Feb 03, 2005 at 15:16 UTC | |
by jdporter (Paladin) on Feb 03, 2005 at 15:30 UTC |