• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Setting the default printer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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. |
----------------------------------------------------------------------


  • Prev by Date: Re: Setting the default printer
  • Next by Date: Re: detect launch of file?
  • Previous by thread: Re: Setting the default printer
  • Next by thread: Re: applescript-users digest, Vol 2 #501 - 14 msgs
  • Index(es):
    • Date
    • Thread