falukky Posted September 5, 2017 Posted September 5, 2017 So i have this windows: https://image.prntscr.com/image/TiLMPo4uQZ6nwU43BID8fA.png And i want to save this file. Any suggestions ?
genius257 Posted September 5, 2017 Posted September 5, 2017 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. To show your appreciation My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser
FrancescoDiMuro Posted September 5, 2017 Posted September 5, 2017 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 ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
falukky Posted September 5, 2017 Author Posted September 5, 2017 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
falukky Posted September 5, 2017 Author Posted September 5, 2017 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
genius257 Posted September 10, 2017 Posted September 10, 2017 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. To show your appreciation My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser
falukky Posted September 12, 2017 Author Posted September 12, 2017 (edited) 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 September 12, 2017 by falukky
genius257 Posted September 12, 2017 Posted September 12, 2017 (edited) If you want to do it with only keys, space will check the checkbox if it has focus. Edit: Tab will help you iterate elements and give them focus. Edited September 12, 2017 by genius257 To show your appreciation My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser
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