kerver Posted August 6, 2003 Posted August 6, 2003 I've used an Applescript to change the default printer in OS X but everything I've tried to restore the original printer has failed. First I tried capturing the current printer name in a global field with status(CurrentPrinterName). In OS X it returns '<unknown>' as the printer name. The next thing I tried was to have Applescript capture the current printer and populate my global field as follows: tell application "Print Center" set defprinter to current printer tell application "FileMaker Pro" set data field "gPrinter Default" of database "db.fp5" to defprinter end tell end tell It returns an error "Can't make <<class prnt>> "Printer Name" of application "Print Center" into the expected type." Does anybody know why either one of these procedures is failing? Is there a better way to restore the original printer that I'm overlooking?
BobWeaver Posted August 8, 2003 Posted August 8, 2003 Try changing this step: set defprinter to current printer to: set defprinter to name of current printer
kerver Posted August 8, 2003 Author Posted August 8, 2003 Excellent...I knew It was something simple I overlooked. Thank You.
Recommended Posts
This topic is 7779 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now