August 6, 200322 yr 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?
August 8, 200322 yr Try changing this step: set defprinter to current printer to: set defprinter to name of current printer
Create an account or sign in to comment