G’day scripters
I’m having problems using the GUI to print QuarkXPress documents reliably (version 10.6.1)
I’d like to use the direct print approach, but need to know the actual name of the nominated printer to do so. This nominated printer will be different on different machines, but will have an assigned System Preferences name.
If, for example, the assigned name is “Large Page Printer”, and this is stored in the variable ‘largePagePrinter’, which actually refers to an HP LaserJet 200 color M251, which is listed in the following code, how do I get the real printer name from the variable?
HP LaserJet 1320 series
HP LaserJet 200 color M251
HP LaserJet 200 color MFP M275
TIA
Regards
Santa
property largePagePrinter : "Large Page Printer"
tell application "QuarkXPress" activate set temp2 to "" tell document 1 tell print setup set temp to printer type list set theList to {} repeat with x from 1 to (count of items of temp) set temp2 to (item x of temp) as text set end of theList to temp2 & return as text end repeat end tell try tell application "Finder" set theFileName to ((path to desktop) & "The List" as text) set fRef to (open for access file theFileName with write permission) set eof fRef to 0 try repeat with x from 1 to number of items in theList write item x of theList & return to fRef end repeat end try close access fRef end tell on error try close access fRef end try end try print #print output style (my largePagePrinter) end tell end tell
|