193
Executing scripts
Once you have written a script, you can create a custom toolbutton to execute it from
within the program. If you intend to write multiple scripts, you will want to create a
toolbar for them.
To create a toolbar for custom scripts:
1. Select the
Options > Customize
menu item.
2. Click the Add Toolbar button on the Toolbars tab.
3. Enter a name for the toolbar and click OK.
4. On the Toolbars tab, select the check box on the Toolbars list to display the new
toolbar in the workspace.
To create a custom toolbutton:
1. On the Toolbars tab, select your custom script toolbar from the Toolbars list.
The toolbar displays at the top of the tab.
2. Click Add Custom Button.
3. In the Custom Toolbutton dialog box, select the Execute an ActiveScript file option.
4. Enter a path and file name in the Script File box.
5. Make selections in the Button Image, Button Caption, and Button Hint boxes.
You can optionally create script hot keys on the Script Shortcuts tab and then click
the Show keyboard shortcuts in toolbutton hints box on the Toolbars tab.
6. Click OK.
You can rearrange the buttons and add separators as needed.
Note
If the scripting engine encounters an error while executing your custom
script, the script file will open in the editor with the error line highlighted.
In addition, information about the error will be displayed in the status
bar, helping you to debug the problem.
In the of Keyboard Shortcuts tab of the Customization dialog, you will find a shortcut
(Shift + Ctrl + Q) for the Execute current document as ActiveScript command.
Executing this command passes the current document to the ActiveScripting engine,
turning the program into a powerful tool for debugging your scripts. As with
toolbutton-based scripts, the scripting language is determined by the file extension of
the current document.
Summary of Contents for COLDFUSION STUDIO 4.5-USING COLDFUSION...
Page 1: ...Allaire Corporation Using ColdFusion Studio ColdFusion Studio 4 5 for Windows 95 98 NT4 2000...
Page 16: ...xvi Contacting Allaire...
Page 90: ...82...
Page 130: ...122...
Page 133: ...141 Two VTML tags CAT and E let you customize the content of these dialog boxes...
Page 182: ...190...