• 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: Scripting Print Window settings without UI scripting?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Print Window settings without UI scripting?


  • Subject: Re: Scripting Print Window settings without UI scripting?
  • From: "Adam Bell" <email@hidden>
  • Date: Thu, 23 Feb 2006 11:16:58 -0400

The printer setup utility is scriptable:

This toggles between mine, neither of which will do any of the other things you want:

tell application "Printer Setup Utility"
    activate
    set myPrinters to every printer
    set DefaultPrinter to current printer
    if item 1 of myPrinters is DefaultPrinter then
        set current printer to item 2 of myPrinters
    else
        set current printer to item 1 of myPrinters
    end if
    display dialog (name of current printer) as text default button 1 buttons {"OK"} giving up after 3
    quit
end tell

You can also find printer names in a shell script. This works for me, but your mileage may vary:

set P to paragraphs of (do shell script "lpstat -p")

You can sort them out from there.

On 2/23/06, Brett Conlon < email@hidden> wrote:

Hiya,

I'm looking to see if any of the following is possible without doing it with UI scripting:

Setting values in Apple's Page Setup window (eg. destination printer, orientation, percent, paper size)

Setting values in Apple's Print window (eg. destination printer, colour settings, paper feed etc.)

Setting the Distiller Setting in the PDF Options menu when printing to "Adobe PDF".

If it can't be directly scripted, are there preferences with these values in them that could be altered by a script? When you pull up the various menus there are options selected, these values must be coming from somewhere... perhaps within the programming itself and therefore inaccessible.

Anyway, just thought it worth asking.

Cheers,

Cojcolds


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (



--
Some minds remain open long enough for a truth to both enter and leave without processing.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Scripting Print Window settings without UI scripting? (From: Brett Conlon <email@hidden>)

  • Prev by Date: ampersands in path names
  • Next by Date: Re: ampersands in path names
  • Previous by thread: Scripting Print Window settings without UI scripting?
  • Next by thread: Background Pict Bug?
  • Index(es):
    • Date
    • Thread