water Posted April 22, 2008 Share Posted April 22, 2008 Hi AutoIt-Gurus,I would like to automate the printing of PDF files using Adobe Acrobat Reader 8.1. For each file I would like to set the printer, orientation ...I tried ControlCommand($In & ".PDF - Adobe Reader","",1136,"SelectString",$Printer) to select a printer from the combobox but it doesn't work.I've read the Note in the AutoIt Help:Note: AutoIt only works with standard Microsoft controls - some applications write their own custom controls which may look like a standard MS control but may resist automation. Experiment! but AutoIt Info Window tells me that it's a ComboBox.Can it be done using ControlCOmmands or could someone suggest anotehr approach?Thanks in advance My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
martin Posted April 22, 2008 Share Posted April 22, 2008 Hi AutoIt-Gurus, I would like to automate the printing of PDF files using Adobe Acrobat Reader 8.1. For each file I would like to set the printer, orientation ... I tried ControlCommand($In & ".PDF - Adobe Reader","",1136,"SelectString",$Printer) to select a printer from the combobox but it doesn't work. I've read the Note in the AutoIt Help: Note: AutoIt only works with standard Microsoft controls - some applications write their own custom controls which may look like a standard MS control but may resist automation. Experiment! but AutoIt Info Window tells me that it's a ComboBox. Can it be done using ControlCOmmands or could someone suggest anotehr approach? Thanks in advanceI haven't got 8.1, but in version 7 the window title is the other way round, ie "Adobe Reader - [filename.pdf]." Otherwise I can't see that you're doing anything wrong assuming you have the ID right. Are you using the File|Print Setup option? You can choose the printer using Send("!N") and then send the name for the printer, like Send("Canon i850"), and send("!o") or Send("!a") for portrait or landscape. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
water Posted April 24, 2008 Author Share Posted April 24, 2008 My fault - once again I used the wrong window title! Now everything runs fine Thanks very much for taking the time! My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
giantsoft Posted April 30, 2008 Share Posted April 30, 2008 Hello Water, I am working on this issue, too. I found this code can print PDF file to default printer directly, really quick and convenient. ============================= shellexecuteWait($PDFFileURL,"","","print") ============================= wondering how to close adobe reader window after printing. Hi AutoIt-Gurus, I would like to automate the printing of PDF files using Adobe Acrobat Reader 8.1. For each file I would like to set the printer, orientation ... I tried ControlCommand($In & ".PDF - Adobe Reader","",1136,"SelectString",$Printer) to select a printer from the combobox but it doesn't work. I've read the Note in the AutoIt Help: Note: AutoIt only works with standard Microsoft controls - some applications write their own custom controls which may look like a standard MS control but may resist automation. Experiment! but AutoIt Info Window tells me that it's a ComboBox. Can it be done using ControlCOmmands or could someone suggest anotehr approach? Thanks in advance empach 1 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