By non-interactive I just mean as a background job where there are no visible windows. I have used the Win32::OLE approach already (which is what Win32::IE::Mechanize is based on) and even with full functionality, the only available function to save image data to disk for the corresponding MSDN SDK is ExecWB. After having done the research, I know this method does not work in Perl without popping up a SaveAs window and typing in the path. Through Win32::GuiTest, I have a hack that automates the typing of the path and saving it to disk, but it still requires a window to be present.

I have looked at all the code samples that you references and provided, but it is not possible to have the saving of an image to disk and javascript support in the same module. The mirror method used in 'get-despair' is not supported by Win32::IE::Mechanize and neither are any of the methods to save non-HTML data to disk.

The main problem is that some of the URL's for the images that I want to save are stored in a javascript variable which I need javascript support to access. If I use Win32::IE::Mechanize to decode the variable, I cannot use it to save the data. I will need the functionality from WWW::Mechanize. Unfortunatley, the site I am trying to browse requires a login and the instance of the Win32::IE::Mechanize object and the WWW::Mechanize object are considered different sessions, I cannot just pass the javascript URL to WWW::Mechanize and save to disk. I will need an active session in both to accomplish what I need.

I have two versions of the program that work, but none of them are "clean". One involves a window propmt and the other involves keeping two sessions active. Does any of this help you better understand my problem?

thanks,
Kevin

In reply to Re^7: save http image data by kcella
in thread save http image data by kcella

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.