Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Print Window settings without UI scripting?



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      ( email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden




--
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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden

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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.