Setting Up a Document > About automating tasks > Creating new commands from history steps

 

Creating new commands from history steps

You can save a set of history steps as a named command, which then becomes available in the Commands menu.

Create and save a new command if there's any chance you'll want to use a given set of steps again in the future, especially if you want to use those steps again the next time you start Dreamweaver; saved commands are retained permanently (unless you delete them), while recorded commands (see Recording commands) are discarded when you exit from Dreamweaver, and copied sequences of steps are discarded when you copy something else.

You can edit the names of commands that you've placed in the Commands menu, and you can delete them from the Commands menu, using Commands > Edit Command List. It's more complicated to edit and delete commands that are built into the Commands menu (that is, commands that you didn't explicitly add); see About customizing Dreamweaver menus.

To create a command:

1 Select a step or set of steps in the History panel.
2 Click the Save As Command button, or choose Save As Command from the History panel's context menu.
3 Enter a name for the command and click OK.
The command appears in the Commands menu.
Note: The command is saved as a JavaScript file (or sometimes an HTML file) in your Dreamweaver/Configuration/Commands folder.

To use a saved command:

1 Select an object to apply the command to, or place the insertion point where you want it.
2 Choose the command from the Commands menu.

To edit the names of commands in the Commands menu:

1 Choose Commands > Edit Command List.
2 Select a command to rename and enter a new name for it.
3 Click Close.

To delete a name from the Commands menu:

1 Choose Commands > Edit Command List.
2 Select a command.
3 Click Delete, then click Close.