http://qs1969.pair.com?node_id=849501


in reply to Re: How do I automatically store non-textual content as a file using Win32::IE::Mechanize?
in thread How do I automatically store non-textual content as a file using Win32::IE::Mechanize?

Thanks Anonymous Monk for the prompt reply. So maybe I was using a wrong tool. I'm now experimenting with Win32::IEAutomation but the following script I've just come up with is too awkward.
use Win32::IEAutomation; use Win32::GuiTest qw(SendKeys); $ie = Win32::IEAutomation->new(visible => 0, maximize => 0, warnings = +> 0 ); $example_url = 'http://china35.newhua.com/down/VideoCutter_Demo.rar'; $ie->gotoURL($example_url,1); sleep(1); SendKeys("S"); #simulates the keypress of "S" to Save sleep(1); SendKeys("~"); #simulates the keypress of Enter to choose the default +Save As location