Re: Setting the default printer
Re: Setting the default printer
- Subject: Re: Setting the default printer
- From: Michelle Steiner <email@hidden>
- Date: Thu, 15 Mar 2001 12:34:23 -0800
On 3/15/01 11:55 AM, g3pb <email@hidden> wrote:
>
if you are using desktop printers ...
>
>
tell application "Desktop Printer Manager"
>
set default printer to desktop printer "printerName"
>
end tell
One important thing about this: the printer name is case sensitive. if
the printer name is "Athena" then it will fail if you use "athena" in the
script.
here's a way to select without having to worry about spelling,
capitalization, etc.
tell application "Desktop Printer Manager"
set printerlist to name of desktop printers
set selectedPrinter to my choosePrinter(printerlist)
set default printer to desktop printer selectedPrinter
end tell
to choosePrinter(whichPrinter)
return item 1 of (choose from list whichPrinter)
end choosePrinter
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------