Aha, my dear Watson...your problem (it seems) is the timeout. Here I will comment it out completely:

my $wait = 300; #until ( $IEWin->{Busy} != 1 || $wait <= 0 ) #{ # $wait--; # sleep 1; #}

perl iestuff.pl Win32::OLE(0.1701) error 0x80020009: "Exception occurred" in METHOD/PROPERTYGET "Document" at iestuff.pl line 22 Use of uninitialized value in numeric lt (<) at iestuff.pl line 26 (#1 +) ....yadda yadda..

Now I'll put it back in:

left_frame <CENTER>This is page1.htm from the example. <BR><BR>Click the link bel +ow to change both frames. <BR><A href="javascript:change2()">Change 2 + Frames</A> <P> <HR> ...yadda...

Note that on different machines you will probably have to INCREASE that timeout. Looks like some objects take longer in IE to properly load. You might consider delving deeper into the IE object model to query the actual status of certain objects before proceeding with the code rather than guessing at the correct timeout.

Try and increase that timeout and reply if it works.

Celebrate Intellectual Diversity


In reply to Re^2: Error trying to get the document object from a frame by InfiniteSilence
in thread Error trying to get the document object from a frame by traviss

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.