Thank you for your post.
A number of users want a "Default" printer option. As it now stands, if you are trying to print to a printer that does not exist, then FileMaker will print to the default printer.
For now, set your scripts to print to the Epson driver, and tell your clients that the demo is set up to print to an Epson SQ-2500. If the clients do not have an Epson SQ2500 (or an Epson that uses that same driver), FileMaker will then print to their default printer.
When you save a Print Setup or Print script step, the print driver is also saved. That is why in Test 3, the print dialog continues to display the K850 driver.
I encourage you to enter this suggestion into our Feature Suggestion web form at:
I could easily copy your post and paste it into the web form, but there are additional questions asked that only you can answer.
Thank you for you response. A variation of that message will probably work in this case.
"When you save a Print Setup or Print script step, the print driver is also saved. That is why in Test 3, the print dialog continues to display the K850 driver."
I see I left out a key detail. The restore that I removed, stored the settings for the EPSON printer.
I expected one of the following four possibilities to control which print driver would be used when I ran the script without a saved print set up in the script:
1) The most recently used print driver would be selected
2) The printer selected manually via Print Setup would be selected.
3) The default printer would be selected.
4) The printer setting last saved in the script would be selected.
In the case of test 4, the K850 is none of these. The Epson was the default, it was manually selected from print set up, it was the printer setting saved in the script and it was the last used to print.
The only possible logic that I can see to why the K850 settings persisted in each case is that the K850 was the default printer at the time the file was originally converted from a 5.5 version file. If that's the case, we've got a significant bug here.
Thank you for the additional information.
In test 4, I need a little more clarification. Are you talking about the setting last saved when you ran the script? Or, are you talking about the setting last saved when you modified the script step itself? The difference is that whatever is stored with the script step (Manage Scripts) should continue to display each time; regardless of what you selected previously when the script is run. For example, if you saved in Manage Scripts the K850 driver, then you execute the script manually, the K850 driver will display. If you change this as the script is running to Epson, it will not save Epson to the script step. The next time you execute the script, K850 will display again. Does that make sense?
Better yet. Create two different scripts. Name one script "Epson" and one script "HP". For "Epson", enter one script step:
Print [ Restore ]
where you are specifying the Epson print driver.
Do the same for "HP".
Now, execute the "Epson" script. You will see the "Epson" driver is selected. You can cancel the script. Do the same for "HP" script.
Create a third script "Last Used". The script step would be:
Print [ ]
If you execute this script, it will display the last printer used. Select the Epson driver and print. Run the script again, and the Epson driver is displayed. Select the HP driver and print. Run the script again, and the HP driver is displayed.
Let me know what tests you are doing, and I'll try to duplicate it here.
The saved "Epson" printer was saved within the script by using the specify button within the script editor. Once I cleared the Specify check box, the script began selecting the K850 printer even though it was, never specified in the script, not selected for printing manually prior to script execution nor selected manually during script execution.
This is why I made started this bug report in the first place!
I'll do some testing with separate, one line scripts for printing, just to see if there might be some corruption in the script itself.
Created a single line script: Print
Replaced Print step in original script with a Perform Script step to perform the above "print" script.
Here's what I observed:
Immediately after launching the file, I see the K850 printer appear in the print dialog opened by this new script.
If I select the epson driver and print once, each subsequent call to the print script shows the epson driver.
However, if I close and reopen the file, I once again get the non-default K850 driver appearing in the dialog and if I modify this new script to select the "no dialog option", it prints with the K850 driver.
Thus, I can get the scripts to print using the default printer driver, but only after I have already printed once to this printer. Closing and re-opening the file resets us back to the wrong driver.
It seems like filemaker is selecting a printer in this scenario according to some sort of logic (perhaps the HP K850 was installed first?) that ignores the Windows default printer setting. I suspect that if my potential customers have only one local printer driver installed, there will be no problem with the demo file. If they have more than one, I may get complaints/lose sales due to the script printing on an unexpected printer.
And another test:
I created two new, single record, single field database files.
I created a single line script in each: Print 
Just to rule out a long shot possibility, I created the one file while the Epson driver was selected as "default" and created the other file while the HP K850 drivers as selected as default.
Regardless of which printer driver is set as the default, both scripts select the K850 driver until a print action is performed that selects a different driver. UNLIKE my demo file, each file appears to retain whichever printer was last used in printing and defaults to that printer--even if I quit and restart Filemaker until I select a different printer.
I can also use File | Print Setup to select a printer and the script will now show whichever driver was thus selected. This also differs from the tests I've performed on my demo file.
Perhaps the demo file has latent corruption? Perhaps a file with defined accounts/passwords behaves differently? Perhaps there's some other significant difference between these files?
Looks like I have more testing to do to try to nail this down. :smileysad:
Problems like this are hard to nail down as Filemaker behaves differantly if the print steps are preformed with or without dialog. (Without will send it too your os's default printer. and the "stored" printer is only retained if you print with dialog and the printer is avalible.) I have taken to using OS level scripting to change Default printer on the computer and then preforming a PageSetup[no dialog] in the file in question in order to send print jobs to any specified printer without the need for user interaction.
The problem is that this is NOT what I am observing. I've been running the scripts with all three settings and comparing the results.
The Print and Print[no dialog] steps are not selecting the default printer consistently.
Print[no dialog] appears to select the same printer I see when I use Print and check to see which printer appears listed in the dialog.
Changing Print[no dialog, restore] to Print[no dialog] prints to a different, non-default printer than the original Print[no dialog, restore] step did.
Now I'm finding that my stripped down test files are behaving differently from my solution file which suggests several additional tests to explore these differences.
Each experiment seems to answer some questions, yet create new ones.
I took my demo file and recovered it. Filemaker reported that "no problems were found..."
I tested the recovered copy and found that its behavior differed from the original copy.
I can now manually use Print Setup to select a printer and Print[no dialog] now prints to the printer selected. This is predictable behavior I can use in my demo release as I can tell users that if they have more than one local printer, they can select the printer from Printer set up in the File Menu.
Just to be sure, I opened my original copy and repeated the same exact steps. In the original, unrecovered copy, any printer selection I make from File | Print Setup... is ignored and the script persists in printing to the HP K850 printer.
So latent file corruption seems to explain the unexpected print behavior, but now a recover operation appears to have fixed the file yet reports that "no problems were found..." :smileymad:
One more comment:
This is a demo version of the file that didn't get backed up in:
Now I wonder if the same file integrity issues might be a factor that explains both problems.
Edit note: above link was broken, now fixed.
The link you supplied is not valid. Please verify.