Restoring Page/Print Setup
By now you have probably guessed that to restore a Page Setup (Mac) or Print Setup (Win) is just a matter of manually specifying the Page/Print Setup settings and then creating the script. This is true for the most part, but there are some additional details you need to be aware of in order to make your Page/Print Setup step work correctly. Not only does Page/Print Setup restore settings from the dialog with the same name, but it restores settings from the Print dialog.
Page Setup for the Macintosh restores:
Page Setup dialog:
- All the settings
Print dialog:
- Number of pages from
- Current Record or Records being Browsed
Print Setup for Windows restores:
Print Setup dialog:
- Orientation
- Paper size and Source
Print dialog:
- Print Range
- Print Quality
- Copies
- Collate
- Print to File
- Number Pages from
- Current Record or Records being Browsed
Since Page/Print Setup restores settings from the Print dialog, it is not enough to just manually set the Page Setup or Print Setup dialog options and then create your script. You actually need to print before creating the script.
NOTE: If you are trying to restore the option for Records being Browsed, printing before you create the script could waste a lot of paper. There are two approaches to minimize paper waste. Either create a found set of one record and then print with the Records being Browsed option or print without regards to the found set and cancel the print job before any pages come out of the printer.
Exercise: Create a script that restores the following settings: Current Record and Landscape Orientation. An easy way to test your solution without printing is to restore the Page/Print Setup settings, but don't print. Just show the Page/Print Setup dialog and the Print dialog. When you are done looking at the Print dialog, click the Cancel button. This script is shown in the RESTORE.fp5 file you downloaded from the first exercise.

Restore Page/Print Setup script in RESTORE.fp5
Advanced Exercise: Page Setup (Mac) and Print Setup (Win) are very similar, but they also differ a great deal. For instance, Print Setup can restore the number of copies to be printed, but Page Setup cannot. A more subtle difference is that page sizes and orientations for the Macintosh and Windows are not the same cross-platform. Therefore, cross-platform solutions need to have Page Setup and Print Setup restored separtately depending on the current platform. Using modular scripting, how would you create a script that allowed you to print on Macintosh and Windows? Remember that modular scripting is the process of splitting a single script into multiple scripts. The scripts are then linked together using the Perform Script command. How would you accomplish the same task of restoring Page Setup and Print Setup without modular scripting?

Restore Cross-Platform [Modular] script in RESTORE.fp5
The modular approach uses the Status(CurrentPlatform) function to determine which Page/Print Setup options to restore. The sub-scripts with the Page/Print Setup script steps were created on the appropriate platform.

Restore Cross-Platform [Better] script in RESTORE.fp5
The better approach is to use the same Page/Print Setup script step to store the settings for both platforms. Page/Print Setup stores one group of settings for each platform. Just visit each platform and run through the steps for changing the Page/Print Setup stored settings. FileMaker will know you are on a different platform and store the settings separately.
Download a FileMaker file demonstrating all the techniques discussed in this training
[Mac] [Win]
Previous
|