Ing. Branislav Gerzo [IBG], on Friday, April 8, 2005 at 12:47 (+0200)
wrote:

IBG> so I played with these values, also put $ie->get in loop, but nothing
IBG> helps. So there is no workaround and I have to use sleep ?

on another forum we've found answer, it works only sometimes, but it
is always better than specify static sleep pause. here is snipped:

use strict;
use warnings;
use Win32::IE::Mechanize;
use Time::HiRes 'sleep';

my $url = 'http://www.google.com';  # you choose
my $timeout = 20;
my $ie = Win32::IE::Mechanize->new(visible => 1,
                                        left => 0,
                                        top => 0,
                                        height => 950,
                                        width => 1280,
                                  );

$ie->get($url);

for (0 .. $timeout*20) {
    last if $ie->{agent}->ReadyState >= 4;
    sleep 0.05;
}
$\ = "\n";
print $_->url foreach $ie->links;

-- 

 ...m8s, cu l8r, Brano.

[Does a Buddist nudist practice yoga bare?]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to