Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7779 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.