Jump to content
RalphShnelvar

AcroRd32 Select printer and print

Recommended Posts

RalphShnelvar

I am a newbie user of AutoIT.

I am trying to print to a specific printer ("Canon MX880 series FAX") and then issue a print.

I have had no success WinMenuSelectItem to select a printer.

I have had no success with ControlClick because, I think, it has no ID.

AutoIt v3 Window Info reports:

Property                Button
Class                   50
Instance                Button50
QassnameNN
Name
Advanced Mode           [CLASS:Button; INSTANCE:50]
ID
Text                    Print
Position                562, 606
Size                    81, 26    
ControOick Coords       40, 16    
Style                   0x50030000
ExStyle                 0x00000000
Handle                  0x051E2984

My crappy code, so far, is

Run("C:\Program Files (x86)\AutoIt3\Au3info")
; Press
;     ctrl/alt/f
;   to unlock Au3info


; This works    
Run("""C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32"" ""f:\RDM brochures\Brochure028\004.pdf""")

; Wait 5 seconds for the Acrobat window to appear.
WinWaitActive("[CLASS:AcrobatSDIWindow]", "", 5)

; Send ctrl P
;   to open print dialog
; This works
Send("^p")

; WinMenuSelectItem("Print", "[CLASS:ComboBox; INSTANCE:1]", "Canon MX880 series FAX")
; WinMenuSelectItem("Print", "Canon MX880 series FAX")

; This does not work
ControlClick ("Print", "[CLASS:Button; INSTANCE:50]", "")

 

Help, of course, would be deeply appreciated.

Share this post


Link to post
Share on other sites
bernd670

Hello,

you can use the parmeter /t to direct print on a printer.

AcroRd32.exe /t filename.pdf printername drivername portname
  • printername – The name of your printer.
  • drivername – Your printer driver’s name. Whatever appears in the Driver Used box when you view your printer’s properties.
  • portname – The printer’s port. portname cannot contain any “/” characters; if it does, output is routed to the default port for that printer.

greetings
bernd


I hacked 127.0.0.1 -> pcfred6.gif

Share this post


Link to post
Share on other sites
RalphShnelvar

Thank you so much!

At least in my environment, the last two parameters are unnecessary.

Ralph

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×