Command functions help you make the most of the files in the Configuration/Commands folder. They manage the Command menu and call commands from other types of extension files.

dreamweaver.editCommandList()

Availability

Dreamweaver 3.

Description

Opens the Edit Command List dialog box.

Arguments

None.

Returns

Nothing.

dreamweaver.runCommand()

Availability

Dreamweaver 3.

Description

Executes the specified command; it works the same as selecting the command from a menu. If a dialog box is associated with the command, it appears and the command script blocks other edits until the user closes the dialog box. This function provides the ability to call a command from another extension file.

Note:

This function can be called within the objectTag() function, from any script in a command file, or from the Property inspector file.

Arguments

commandFile, {commandArg1}, {commandArg2},...{commandArgN}

  • The commandFile argument is a filename in the Configuration/Commands folder.

  • The remaining arguments, commandArg1, commandArg2, and so on, which are optional, pass to the receiveArguments() function in the commandFile argument.

Returns

Nothing.

Example

You can write a custom Property inspector for tables that lets users get to the Format Table command from a button on the inspector by calling the following function from the button’s onClick event handler:

 function callFormatTable(){ 
    dreamweaver.runCommand('Format Table.htm'); 
}

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy