Developer’s Guide

Table Of Contents
3-14
Developer’s Guide
The Status (CurrentPlatform) function returns a 1 when run on a
computer using the Mac OS, a 2 when run on a computer using
Windows 95 or Windows 98, and a -2 when run on Windows NT
systems. Use this function with the If script step to perform different
actions depending on the current platform.
If [“Status (CurrentPlatform) = 1]
Perform Script [Sub-scripts, “Print in Mac OS”]
Else
Perform Script [Sub-scripts, “Print in Windows”]
End If
Creating platform-specific scripts
Although most ScriptMaker steps work on both platforms, some
script steps rely upon platform-specific features. The following steps
are platform-specific:
Windows-only script steps
1 DDE Execute
1 Send Message
1 Insert Object
1 Update Link
Mac OS-only script steps
1 Send Apple Event
1 Perform AppleScript
1 Speak
The Windows Print Setup script step is translated to the Mac OS
Page Setup script step, and vice versa. Note that print options depend
on the printer driver, so that options you save with a script on one
machine may not be available on another. The Send Message script
step (Windows) is translated to the Send Apple Event script step
(Mac OS), and vice versa.
Other platform-specific script steps are skipped when run on a
different platform. Also, platform-specific script steps are shown in
italics when viewed on a different platform.
Protecting your runtime database
solution files
To prevent FileMaker Pro users from modifying the structure of your
runtime database solution, define passwords for each database in
FileMaker Pro before binding the files to the runtime application.
Runtime solution files can be opened in FileMaker Pro—if
passwords have not been defined, users can access and modify
scripts, field and relationship definitions, access privileges, and
layouts.
You can permanently remove access to the Access Privileges menu
command after you’ve defined the passwords, as well as access to
other menu commands, by selecting the Permanently prevent
modification of database structure option in the Developer Tool. See
“Removing design access to your databases” on page 2-11 for
information.
Setting a default password
You may want to set a master password that gives you access to the
entire file and another password that gives users limited access. If
most of your users will be using the same password to access your
solution, you can set the password as the default and suppress the
password dialog box from appearing when the file is opened. Then,
to display the password dialog box so you can enter a different
password such as your master password, press Shift (Windows) or
Option (Mac OS) as you open the file.
To set a default password for a database and suppress the password
dialog box:
1. In FileMaker Pro, choose Edit menu > Preferences > Document.