Trying to script OS X printer presets

I have a very simple Automator application to go find a specific document on a server and ask if I want it printed. The problem is that I can’t figure out how to tell the script that I want to use a printer preset I named “Double sided”. The script always seems to use the “Standard” preset which cannot be modifed, at least by standard means of the print dialogue boxes.

I’ve tried this script inside the Automator application:

do shell script
"defaults write com.apple.print.custompresets com.apple.print.lastPresetPref Double sided"

which I found on MacOSXHints, but does not work at all for me and returns the error “Can’t make current application into type string.”.

Is there another script to set the printer preset, or that would bring up the normal print dialogue box where the preset could be chosen?

I started out to modify the com.apple.print.custompresets.plist file that controls this, thinking I could change the name of the preset “Double sided” to “Standard” however I quickly got lost…

Any ideas?

Thanks
Steve

Model: G5 dual 2 Ghz
AppleScript: 1.10.7
Browser: Safari 419.3
Operating System: Mac OS X (10.4)