• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 13. Using Templates and Scripts > Using Buttons with Scripts

Using Buttons with Scripts

Some folks find the whole notion of scripts intimidating. But put a clearly labeled, script-linked button in a layout and the message is clear: “Click me.”

To define a button:

1.
Once you’ve defined a script, switch to Layout mode ( in Windows, on the Mac) and select a layout via the pop-up menu just above the flipbook icon.

2.
Click the Button Tool within the Layout status area (Figure 13.40), then use your cursor to draw a button within the layout. Release the cursor when the button reaches the size you want (Figure 13.41).

Figure 13.40. Click the Button Tool to add a script-linked button to a layout.


Figure 13.41. Click and drag the cursor in the layout to create a button.


3.
When the Specify Button dialog appears, select a script step from the left-hand list (Figure 13.42). Set options for the script step, if any, using the Specify pop-up menu in the Options panel. Not every step will offer the same options, and steps grayed out in the list don’t apply to your particular button.

Figure 13.42. Use the Specify Button dialog box to assign a script and shape to the button.


or

If you want to use a script step of your own that you’ve already defined, select Perform Script from the Control portion of the left-hand list, then use the Specify pop-up menu in the Options panel to select your step (Figure 13.43).

Figure 13.43. To assign one of your own scripts to a button, select Perform Script from the left-hand list and use the Specify pop-up menu.


4.
If you do not want the script step applied immediately, use the second pop-up menu in the Options panel to select another state: Halt, Exit, Resume, or Pause (Figure 13.44).

Figure 13.44. If you do not want a script step applied immediately, use the second pop-up menu in the Options panel to select one of four other states.


5.
Click OK to close the Specify Button dialog box.

6.
When the layout reappears with the new button, type in a label for it at the I-beam cursor (Figure 13.45). When you’re done, press on the numeric keypad. You can now format the button’s appearance or switch to Browse mode ( in Windows, on the Mac) and your button’s ready for action. See To set or change a button’s appearance on the next page.

Figure 13.45. When the layout reappears with the new button, type in a label so its function is clear.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint