Jump to content
Sign in to follow this  
neilontherock

Please help - ControlClick does always work

Recommended Posts

neilontherock

Hi,

I have a perl script written that navigates to a website and uses the AutoitX3.Control to download a file from the web. My code works fine until the File Download dialog appears and then it freezes. I would expect the Save button to get fired but it does not. The funny thing is it did work a couple of times but I cannot get it to work consistently.

Below is a snippet of my code. Am I doing something wrong. I reviewed all of the documentation for the ControlClick function and my code should be valid. Any suggestions or help would be greatly appreciated. Line 3 doesn't respond when the File Download dialog appears. The button caption is "Save" and the Dialog title is "File Download".

1. my $autoit = Win32::OLE->new('AutoitX3.Control');

2. $autoit->WinWait('File Download','', 5);

3. $autoit->ControlClick('File Download', '', '&Save');

4. $autoit->WinWait('Save As', 'Save &in', 5);

5. $autoit->ControlSetText('Save As', 'Save &in', 'Edit1', 'C:\Downloaded Ie Files\test.zip');

6. $autoit->ControlClick('Save As', 'Save &in', '&Save');

7. $autoit->WinWait('Download complete');

8. $autoit->WinClose('Download complete');

Many thanks.

Share this post


Link to post
Share on other sites
DBorges

Same problem here! Even in pure code AutoIt, the script does not work screen locked server!! =/

Share this post


Link to post
Share on other sites
Jos

Same problem here! Even in pure code AutoIt, the script does not work screen locked server!! =/

Understand it was clear to you before not to reply to posts thios old without any apparent reason.

Final, now official warning to stop this


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×