Developer’s Guide

Table Of Contents
Customizing database solutions 41
controls, navigate, and much more. For more information about
creating scripts to automate tasks, see Help.
Note Use the Debug Scripts option on the Scripts menu to test
scripts. See
“Using the Script Debugger” on page 12.
Creating startup scripts
Startup scripts are useful for controlling what appears when users
open a file in your solution. You can control which layout is
displayed and the size, position, and magnification of the window.
For a startup script example, see Help.
To create a startup script:
1. Open the primary file of the database.
2. Choose Scripts menu > ScriptMaker and create a script to perform
the desired actions.
3. Choose File menu > File Options > Open/Close tab.
4. For When opening this file, select Perform script, then from the drop-
down list choose the script you created.
5. Click OK.
The script that you specified is automatically performed whenever
the file is opened.
Centering database windows in Kiosk screens
To center your databases in the middle of a Kiosk screen, create a
startup script that uses the Adjust Window and Set Zoom Level script
steps. When a file is opened in Kiosk mode, two things will happen:
1 The database window snaps to fit layout objects at the right and
bottom edges of the layout.
1 If the window is smaller than the available screen area, it is
centered in the middle of the screen.
Important Before using the Adjust Window script step, perform any
script steps that affect the window display area (such as Go to Layout
or Show/Hide Status Area). Once the window area is determined,
add the Adjust Window script step.
The Adjust Window script step may cover up a window that has an
Exit Application button. Be sure that users can close the Kiosk
database solution easily.
Emulating menu commands and window controls
Use the following script steps to emulate menu commands and
window controls.
An example of a file-specific File Options dialog box
To emulate these
interface elements
Create buttons with these
script steps attached
Menu commands Script steps for any menu command (for example,
Sort Records, Print, and Open Preferences)
Zoom controls Adjust Window or Set Zoom Level
Status area control Show/Hide Status Area
Mode pop-up menu Enter Browse Mode, Enter Find Mode, or Enter
Preview Mode