Database Reference
In-Depth Information
Buttons
As you learned on Creating a Button , you can add buttons to any layout—or turn existing
fields, labels, pictures, and so forth into clickable buttons. At the time, you used simple
single-action buttons, like a button that switches layouts. If you revisit the Specify Button
dialog box now, you see the list of button commands is almost exactly like the list of avail-
able script steps. A button is, in some sense, just a one-line script.
Figure 11-11. In the Manage Scripts window, every script has a checkbox by its name. If you click
this box, the script appears in the Scripts menu, and you can run it simply by selecting it. At the top,
you can see the Scripts menu that results from the settings shown. On page 428, you learn how to
make folders to organize your scripts and the Scripts menu.
But most of the time you want a button to run a script you've written. Choose the Perform
Script action and then click Specify. The Specify Script dialog box lets you pick an existing
script or create a new one. Then, when you click the button, the script you chose runs. But-
tons are an exceptionally handy way to run scripts because people recognize that they just
need to click them to get what they want. Better still, since buttons are on layouts, you can
prevent users from running a script in the wrong context, because you wouldn't ever put a
button on a layout where it doesn't make sense.
Search WWH ::




Custom Search