spoo 0 Posted July 22, 2019 (edited) Hello, I have written a code which downloads files from a web application. steps 1. click on save -> save as 2.window pop opens-> then do control set to give the desired file location and File name Surprisingly the code that i have written works well on my windows but on other systems it goes to their default download location with default file name ,(does not change the file name). #include <IE.au3> #include <Crypt.au3> #include <Excel.au3> #include <File.au3> Local $hIE = WinGetHandle("[Class:IEFrame]") Local $hCtrl = ControlGetHandle($hIE, "", "[ClassNN:DirectUIHWND1]") $WinHndz = WinGetHandle("xyz") WinActivate($WinHndz) If WinExists($hIE,"") Then $WinHndz = WinGetHandle("xyz") WinActivate($WinHndz) ControlClick($WinHndz,"","DirectUIHWND1","left",1,838,28) ControlSend($WinHndz,"","DirectUIHWND1","{UP}a") sleep(1000) ControlSetText("Save As", "", "Edit1", @ScriptDir &"\EVM file" &"\test.xlsx") sleep(1000) ControlClick("Save As", "", "Button1") EndIf Could someone tell me what is that I'm doing wrong ? please.. Note: i can see controlSetText doing its job , however when it clicks on save button it goes to default download location. Edited July 30, 2019 by spoo Solved Share this post Link to post Share on other sites
spoo 0 Posted July 30, 2019 Local $hIE = WinGetHandle("[Class:IEFrame]") Local $hCtrl = ControlGetHandle($hIE, "", "[ClassNN:DirectUIHWND1]") $WinHndz = WinGetHandle("Airbus Enhanced Configurator") WinActivate($WinHndz) If WinExists($hIE,"") Then $WinHndz = WinGetHandle("Airbus Enhanced Configurator") WinActivate($WinHndz) ControlClick($WinHndz,"","DirectUIHWND1","left",1,838,28) ControlSend($WinHndz,"","DirectUIHWND1","{UP}a") sleep(500) ConsoleWrite(@ScriptDir &"\EVM file" &"\"&$sheet_name & @CRLF) ControlSetText("Save As", "", "Edit1", @ScriptDir &"\EVM file" &"\"&$sheet_name&".xlsx") ControlSend("Save As", "", "Edit1","{END}x{BACKSPACE}") ControlClick("Save As", "", "Button1") EndIf for Some reason after controlSetText ,controlSend had to be given. Share this post Link to post Share on other sites