Hello,

For the past few days I have been trying to write a little utility that will fire up IE navigate to a page fill out a form and submit it using Win32::OLE. For the most part this work beautifully, however, I am running into a problem with <input type="file"> objects. Apparently these are read only so I can't simply set the value in perl (at least not that I am aware of).

So instead I just use the ->Click() method which brings up a dialog box to choose a file.

The problem is after this ->Click() no other perl code is executed until I close the dialog box...I have a method that will fill in the name of the file and submit it, the problem is when I can't seem to detect when the file chooser dialog comes up :(

IE doesn't seem to fire any events indicating this dialog has been activated.

Basically I need to know when the dialog is open so I can execute code to fill in the file name and submit it.

Is there something I am missing here? Do I need to add another listener (ie Win32::OLE->WithEvents( ????)) that might catch this event?

Is there some other way to do this?

Thank you in advance for any insight anyone can provide.

In reply to Catching windows dialog events Win32::OLE? by vectorscope

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.