To solve the problem, complain to FileMaker to fix this problem, which has plagued FileMaker Pro for quite a while.
To get around the problem:
When FMP gets fixated on one printer and won't let it go, I've recently had success telling users to do a File > Print Setup prior to running the script. Have them select Printer 2 there. Even if they're doing this on a GUI screen and not the layout that will be printed in the script.
No, this shouldn't be required since they're already selecting Printer 2 in the print dialog you have in the script. No, it doesn't make any sense. But, there it is. :)
Pray for a fix in FMP 10.
Thank you for your post.
Yes, there is a problem on Windows with printing where the default printer does not change. I cannot duplicate the problem (Windows XP sp 3), so I cannot determine if FileMaker Pro 10 (released today) fixes this problem. Can anybody confirm one way or the other?
In the mean time, as "jsalzer" mentioned, create a script that prints to the second printer. This works correctly.
I hate to contradict you, but I want to make sure the OP doesn't misunderstand your mis-summary of my post, given that you have not experienced the problem as we have.
When the script doesn't work (even if the users change the printer in the dialog box that opens during the script), users will have to change the printer in File>PrintSetup PRIOR TO running the script.
I'm looking forward to receiving my v.10 upgrade to see if this has been alleviated. :)
Sorry for the confusion. You should have both script steps in the script. That is "Print Setup" script step to select the printer followed by "Print" script step. This has seemed to work for most (if not all) users.
I believe the OP was already doing both script steps. Doing a manual Print Setup prior to running said script is a work-around for the (also many) of us for whom the problem remains, despite using both script steps.
It unfortunately feels like the FM engineers assume that the developer is scripting in the user's environment. And that all users having access to the same printers. And that users don't ever want to print anywhere besides their default printers. I'd love to invite the engineers to come over and test all these things in an environment where some users can and some can't change their destination printers during scripts, and where some users can and some can't correctly print to Dymo's correctly. If anyone at FM is planning a trip to Illinois, give me a yell. :)
(Yes, I still love you all. Long live Claris! No - wait.)
Yes...Removing the "Perform AppleScript" altogether and using a pre edited "Print Setup" functions works.
But what about when the user needs to use another printer..say at home or remote?