Jump to content
Sign in to follow this  
falukky

Autoit script for download Firefox file

Recommended Posts

genius257

Hi @falukky.

Use the window class: "MozillaDialogClass"

The controls does not seem to be accessible, so you would need to use ControlSend or ControlClick to activate the OK button.

So with WinActivate , Sleep and the functions above, you should be good to go.

Share this post


Link to post
Share on other sites
FrancescoDiMuro

Hi @falukky, and welcome to the AutoIt forum :)

How that window is prompted? Do you prompt it manually, and you want to automate the save?

Provide always as much information as you can... More information are, more we can help you :)


Click here to see my signature:

Spoiler

I will always thank you for the time you spent for me.
I'm here to ask, and from your response, I'd like to learn.
By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

ALWAYS GOOD TO READ:

In case I am violating some pseudo Forum rule, or I am doing something wrong, I want let you know that I'm not doing this on purpose, and for this, I kindly ask you to send me a private message about the "bad content" I posted, in order to edit/remove it, and to not be warned wrongly.
Thanks in advance.

 

Share this post


Link to post
Share on other sites
falukky

I am using selenium to click on the link and after that i have this Firefox windows.

All i want to do is check this save file and click OK to download the file

Share this post


Link to post
Share on other sites
falukky

So i have this script:

 

WinActivate("[Class:MozillaDialogClass]");
Send("{DOWN}")
Sleep(2000)
Send("{ENTER}")

 

And this works fine but the question is if this is enough 

Share this post


Link to post
Share on other sites
falukky

Any suggestions ?

Share this post


Link to post
Share on other sites
genius257
On 9/5/2017 at 4:48 PM, falukky said:

And this works fine but the question is if this is enough 

Only you would know, right?

A suggestion would be implementing any kind of window based statement like WinExists, WinWait, WinWaitActive or maybe a hook with window creation?

Also add some kind of code checking if window focus is lost, while you wait for the OK button to be available?

But you could check the checkbox stating that you want FF to do that action automatically every time for that file-type.

Share this post


Link to post
Share on other sites
falukky

Check the checkbox should be smart idea because if the checkbox is in the 'Save file' state it become 'Open With' when i press OK.

how can i check this checkbox ?

Edited by falukky

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  

×