I have written a code to automate Adobe Printing a file to PDF function using AutoIT, the requirement is, "when we open Adobe pdf document and run the below script, it should automatically print it to pdf and save it to a specific location".
But when I run the below Autoit script file, instead of saving to the given path, it is saving just a folder before the given file path. Not the end point folder in the given path.
"C:\u1\home\Audits_ABC\Completed_Audits\Server_Upload\" is the specific path.
But, it is saving the pdf in folder "C:\u1\home\Audits_ABC\Completed_Audits\" and skipping the last "Server_Upload" folder
I'm new to AutoIt, Does the ControlSend command have a limitation for taking the complete file path? Is there an alternative to it?
Or am I making a mistake in writing the code. Please help
PS: Ignore the long sleep pauses in the code.
MouseClick("Left",75,167)
Sleep(2000)
Send("^p")
Sleep(3000)
Send("A")
Sleep(2000)
ControlCommand("Print","","ComboBox","Selectstring",'Microsoft Print to PDF')
ControlClick("Print","","Button50")
Sleep(5000)
ControlClick("Save Print Output As","","ToolbarWindow324")
Sleep(2000)
ControlClick("Save Print Output As","","Edit2")
Sleep(2000)
Send("^a")
Sleep(2000)
Send("{ENTER}")
Sleep(2000)
ControlSend("Save Print Output As","","Edit2","C:\u1\home\Audits_DTS\Completed_Audits\Server_Upload")
Sleep(5000)
ControlClick("Save Print Output As","","Button2")
Sleep(1000)