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

Changing Default Printing Applescript


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

Recommended Posts

Posted

I have a script working under Mac osX

tell application "Printer Setup Utility"

Set the current printer to printer "iR2200i"

end tell

Since upgrading to Leopard there seems to be no "Printer Setup Utility" so FMP will not change the default printer...

Any ideas how applescript can change printer defaults

Posted

Why do you need AppleScript to do it?

If you use 'page setup' and 'print' steps in your FileMaker script, you can specify which printer FileMaker should send the output to.

No need for an AppleScript as this method works fine on Mac OS X. (Windows is another story, printing is a nightmare!)

Hope this helps.

J

Posted

Applescript is used to give users the options of using different printer around the office via a message window, this will set page setup and print options without the user having to thimk as what to do.

it seams that Apple has removed the Printer Setup Utility in Leopard

Posted

Ah, I see. Apparently they have changed it again in Snow Leopard so even if you find a fix I wouldn't guarantee it works for long!

If you know about all the printers in the office it is probably simpler to script it all in FileMaker something like this:


show custom dialog 'Choose printer'

if get(lastmessagechoice) = 1

     page setup [restore, no dialog]      /* settings for printer 1 */

     print [no dialog]                    /* print to printer 1 */

else if get(lastmessagechoice) = 2

     page setup [restore, no dialog]      /* settings for printer 2 */

     print [no dialog]                    /* print to printer 2 */

else if get(lastmessagechoice) = 3

     page setup [restore, no dialog]      /* settings for printer 3 */

     print [no dialog]                    /* print to printer 3 */

end if

If you have more than three printers, you can't use a FileMaker dialog so you would perhaps be best off creating a little dialog layout with a drop-down list on it and showing that in a new window, then setting a variable to the result and doing your IF statements based on the variable.

This method will cope with changes in the OS and people who may be using different versions of it. If the wind is blowing the right way it may even work in Windows too ;-)

J

Posted

Applescript is used to give users the options of using different printer around the office via a message window, this will set page setup and print options without the user having to thimk as what to do.

it seams that Apple has removed the Printer Setup Utility in Leopard

What makes you say that? Have you tried it?

The app is still there and is called the same way, but it is a little bit hidden.

For instance try this in the applescript script editor:

path to application "Printer Setup Utility"

This topic is 5629 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.