--- Robert May <[EMAIL PROTECTED]>
wrote:
> I tried using
>   system "start temp.html";
> instead, and I see  the delay you're taking about. 

I had a similar issue trying to launch a web browser
using system "start ..."

My workaround was to use a Win32::API call to
ShellExecuteA

Using your example:



#!perl -w
#use strict;
#use warnings;
 
use LWP::UserAgent;
use Win32::GUI();
 
# Creation of the LWP Useragent 
# with the Firefox Cookie file
my $ua = LWP::UserAgent->new;

# Creation of the GUI
my $main = Win32::GUI::Window->new(
    -title => 'Link Filter',
    -size  => [295, 161],
    -maximizebox => 0,
    -resizable   => 0,
    );
 
 $main->AddLabel(
     -pos  => [4,4],
     -size => [100,17],
     -text => 'Bitte URL eingeben:',
 );
 
 $main->AddTextfield(
    -name => 'tfURL',
    -pos  => [4,20],
    -size => [281, 77],
    -multiline => 1,
    );
 
 $main->AddButton(
    -name => 'btGet',
    -pos  => [5, 100],
    -size => [279,33],
    -text => 'Get Them!',
 );
 
 $main->Center();
 $main->Show();
 Win32::GUI::Dialog();
 $main->Hide();
 
 sub btGet_Click {
    return -1;
 }
 sub open_browser {
   my $url=shift;
   use Win32::API;
   my
$shell=Win32::API->new('shell32','ShellExecuteA','NNPNNN','N');
   my $return=$shell->Call(0,0,$url,0,0,1);
 }
 my $url = $main->tfURL->Text();
 $ua->get($url, ':content_file' => 'temp.html');
 open_browser('temp.html');


       
____________________________________________________________________________________
Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php

Reply via email to