PeterKonc Posted January 29, 2018 Share Posted January 29, 2018 Hello everybody. I'm trying to save PDF file from IE11 (Adobe Reader plugin). I'm using: ControlSetText("Save As", "", "Edit1", $CmdLine[2]) where CmdLine[2] is absolute path to save the PDF. Default name of file is Alerts.pdf, and I want to rename it and save into specific path. Problem is that this path is just ignored, even though it was inserted. See the screenshot. Any idea? Thank you in advance! Link to comment Share on other sites More sharing options...
Earthshine Posted January 29, 2018 Share Posted January 29, 2018 print out your code so it can be reviewed. don't keep us guessing from screenshots that provide little to no relevant data. put in a msgbox of what CmdLine[2] computes to before calling the function with the bug. PeterKonc 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
PeterKonc Posted January 30, 2018 Author Share Posted January 30, 2018 Of course man! Where's my manners? WinWait($CmdLine[1],"",20) ControlFocus($CmdLine[1],"","AVL_AVView15") Send("+^{S}") Sleep(4000) WinWait("Adobe Reader","",20) ControlClick("Adobe Reader", "","Button2") WinWait("Save As","",10) Sleep(4000) ControlSetText("Save As", "", "Edit1", $CmdLine[2]) Sleep(4000) ControlClick("Save As", "","Button1") WinWait($CmdLine[1],"",10) Send("!{F4}") The CmdLine[2] is just string representing path of file to be saved. I personally solved the issue by just replacing: ControlSetText("Save As", "", "Edit1", $CmdLine[2]) with: Send($CmdLine[2]) But who knows, perhaps you have more elegant solution for this problem. Cheers! Earthshine 1 Link to comment Share on other sites More sharing options...
Zedna Posted February 3, 2018 Share Posted February 3, 2018 Try to use some shorter/more simple path for testing purpose. Maybe your very long path is too much and it's not accepted by Save dialog. Also check existence of whole directory structure passed as path. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
jdelaney Posted February 4, 2018 Share Posted February 4, 2018 (edited) I was playing around a bit and was only able to get controlsettext to work if I than sent, and deleted, a space. This is still much more reliable than sending the full string at least. Edited February 4, 2018 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Zedna Posted February 4, 2018 Share Posted February 4, 2018 Try to use ControlFocus() to some button in dialog after your ControlSetText(). Maybe it can invoke some internal "itemchanged" event in dialog ... Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
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