O'Reilly logo

AppleScript in a Nutshell by Bruce W. Perry

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Desktop Print Manager

Syntax

tell app "Desktop Printer Manager"
   (* Find out which installed drivers can work with desktop printers; a 
   list of these drivers is stored in the drivers variable, if your 
   computer has any supported drivers *)
   set drivers to supported drivers
end tell

The following dictionary commands and classes are based on the Desktop Printer Manager Version 1.0. The DPM has been scriptable since Mac OS 8.5 (in fact, it was introduced with that OS version).

Dictionary commands

run

This command sends DPM a run Apple event to open it (this is not usually necessary since a tell statement targeting DPM will implicitly launch the application if it’s not already open).

quit

This quits the DPM app. The DPM quits automatically after it is finished processing your script, unless its quit delay property is set to never. See the quit delay section elsewhere in this chapter.

make

You can make a new desktop printer with this command and give it some properties:

new desktop printer object

A required labeled parameter that always takes the form of:

make new desktop printer ...

not:

make new file

or some other object. See the desktop printer class description for a review of this object’s properties.

at alias

This is a labeled parameter that lets you decide where to create the desktop printer icon. If you do not include this optional parameter then the desktop printer (DTP) is created on the desktop. An example is:

make new desktop printer at (alias "macintosh hd:desktop folder:printers:") ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required