neilontherock Posted December 19, 2008 Posted December 19, 2008 Hi, love the tool but can someone explain to me. The only difference in the 2 code snippets is the URL and the HTTP control that is clicked. I also tried the Control ID of the Save button in the code and it still does not work in the second code snippet. The Perl code works and the file downloads fine. my $ie = Win32::IEAutomation->new( visible => 1, maximize => 1); $ie->gotoURL('http://search.cpan.org/~prashant/Win32-IEAutomation-0.5/lib/Win32/IEAutomation.pm'); $ie->getLink('linktext:', 'Source')->Click; my $autoit = Win32::OLE->new('AutoitX3.Control'); $autoit->WinWait('File Download', '', 5); $autoit->ControlClick('File Download', '', '&Save'); $autoit->WinWait('Save As', 'Save &in', 5); $autoit->ControlSetText('Save As', 'Save &in', 'Edit1', 'C:\Downloaded Ie Files\IE.csv'); $autoit->ControlClick('Save As', 'Save &in', '&Save'); $autoit->WinClose('File Download'); $ie->closeIE; and this code does not; The save button on the Download dialog do not fire. my $ie = Win32::IEAutomation->new( visible => 1, maximize => 1); $ie->gotoURL('http://finance.yahoo.com/q?s=IBM'); $ie->getLink('linktext:', 'Download Data')->Click; my $autoit = Win32::OLE->new('AutoitX3.Control'); $autoit->WinWait('File Download', '', 5); $autoit->ControlClick('File Download', '', '&Save'); $autoit->WinWait('Save As', 'Save &in', 5); $autoit->ControlSetText('Save As', 'Save &in', 'Edit1', 'C:\Downloaded Ie Files\IE.csv'); $autoit->ControlClick('Save As', 'Save &in', '&Save'); $autoit->WinClose('File Download'); $ie->closeIE;
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now