User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2
On 29/03/07 16:13, Nick Hearn wrote:
Hi There,
Using the follow shell command a script can change the default paper
size selected:-
do shell script "defaults write
com.apple.print.PrintingPrefs DefaultPaperID iso-a4"
Please can someone tell me if it's possible to turn on duplexing in a
similar way.
Assuming a preset "Test" already exists, you could do something like this:
tell application "System Events"
tell property list file (path of file
"com.apple.print.custompresets.plist" of preferences folder)
-- Set duplexing of preset "Test" to wanted value.
set value of property list item
"com.apple.print.PrintSettings.PMDuplexing" of property list item
"com.apple.print.preset.settings" of property list item "Test" to 2
-- Make sure preset "Test" is selected.
set value of property list item
"com.apple.print.lastPresetPref" to "Test"
end tell
end tell