Loading ...
Sorry, an error occurred while loading the content.
 

Please Help : ProgressChange and $IE->ReadyState() == 3

Expand Messages
  • tosobz
    Hi I got a problem as described after the ---- ... module Win32::CaptureIE gets trapped (see below) Sample.pl: #!/usr/bin/perl Please Help : ProgressChange
    Message 1 of 1 , Nov 4 11:37 PM
      Hi I got a problem as described after the ---->
      ----> While loading a web site (example: www.sonnleiten.biz) the
      module Win32::CaptureIE gets trapped (see below)


      Sample.pl:
      #!/usr/bin/perl


      Please Help : ProgressChange and $IE->ReadyState() == 3

      use Win32::CaptureIE;
      StartIE;
      print "Ok, IE started\n";
      Navigate('http://www.sonnleiten.biz/');
      print "Ok, navigate\n";
      QuitIE;


      ----> While loading a web site (example: www.sonnleiten.biz) the
      module Win32::CaptureIE gets trapped in the following position:


      sub EventHandler {
      my ($obj,$event,@args) = @_;
      # if the document is fully loaded and ready after Navigate()
      if ($event eq 'DocumentComplete' && $IE->ReadyState() == 4) {
      Win32::OLE->QuitMessageLoop;
      }
      # if the document is fully loaded and ready after Refresh()
      if ($event eq 'DownloadComplete' && $refreshing_page) {
      $refreshing_page = 0;
      Win32::OLE->QuitMessageLoop;
      }
      #-------------------------------------------
      # add this to test
      print $IE->ReadyState(), "\t $event\n";
      if ($event eq 'ProgressChange' && $IE->ReadyState() == 3) {
      print "oops\n";
      }
      # end modify
      #-------------------------------------------

      # if new window is going to be created
      if ($event eq 'NewWindow2') {
      …….


      ------> The process never stops as it gets trapped (blocked) in this
      situation:
      What can i do?


      ----> Output
      …..
      1 StatusTextChange
      1 StatusTextChange
      1 StatusTextChange
      1 StatusTextChange
      1 CommandStateChange
      1 TitleChange
      1 NavigateComplete2
      1 StatusTextChange
      4 StatusTextChange
      3 StatusTextChange
      3 CommandStateChange
      3 CommandStateChange
      3 CommandStateChange
      3 TitleChange
      3 StatusTextChange
      3 ProgressChange
      oops
      3 StatusTextChange
      3 StatusTextChange
      3 StatusTextChange
      3 ProgressChange
      oops
      3 ProgressChange
      oops
      3 ProgressChange
      oops
      3 ProgressChange
      oops
      3 ProgressChange
      oops
      3 ProgressChange
      oops
      3 ProgressChange
      oops
      3 StatusTextChange
      3 StatusTextChange
      3 ProgressChange
      oops
      3 ProgressChange
      oops
      3 ProgressChange
      oops
      3 ProgressChange
      oops
    Your message has been successfully submitted and would be delivered to recipients shortly.