The History panel tracks all your actions in the Document window, such as menu options you have selected and characters you have typed. You can use it to undo, redo, and automate one or more commands, but it doesn't track your actions in the Site window and it isn't available when in Code view. To open the History panel, shown in Figure 7-9, use Window History or Shift+F10.
Figure 7-9. The History panel
The vertical slider on the left side can be used to undo and redo steps in the History panel. You can also click to the left of a step to undo to that point. Use Edit Undo, or Ctrl+Z (Windows), or Cmd+Z (Macintosh) to undo a single step. Use Edit Redo, or Ctrl+Y (Windows), or Cmd+Y (Macintosh) to redo a single step. Set the maximum levels of Undo using Edit Preferences General Maximum Numbers of History Steps (large numbers may consume excessive memory and slow performance).
The history is kept separately for each open document and disappears when you close a document. Unlike most other programs, however, you can undo steps even after saving a document (as long as you haven't closed it). You can clear the History panel, using the Clear History command in the pop-up menu, to conserve memory, but doing so prevents you from using undo.
If you undo several steps and then start a new action, the undone actions are discarded (i.e., those steps can't be recovered).
7.3.1 Replaying Steps
The History panel allows you to repeat a step or series of steps that have been performed. Select the step(s) that you wish to repeat and click the Replay button (indicated in Figure 7-9) or choose Replay Steps from the pop-up menu.
You can't edit steps or modify their order in the History panel, but you can skip steps. To do so, select a step and then use Ctrl-click (Windows) or Cmd-click (Macintosh) to select additional steps (they need not be contiguous). For example, you can select the first, third, and fifth steps in a process, but skip the second and fourth steps. When you click the Replay button, only the selected steps are repeated.
The History panel shows the history for the current window only (although it maintains a history for all open documents). To copy a series of steps into another document:
Commands can be applied to individual elements, but not to groups of elements. For example, you can resize three images separately, but not as a group . See "Applying Steps to Multiple Objects" in the Dreamweaver Help for details on applying steps to multiple elements (the trick is to select the next element using the Shift and arrow keys, not the mouse).
7.3.2 Creating Custom Commands
Creating custom commands from the History panel allows you to repeat a task multiple times. To create a command from steps that have already been performed, highlight the steps in the History panel and click the Save As Command button (see Figure 7-9). This button opens the Save As Command dialog box, which allows you to name your command. Custom commands appear on your Commands menu and can be used in any Dreamweaver file, not just the original document. Good uses for custom commands include Copyright or Designed By statements, privacy policies, or anything that's used across multiple pages or multiple sites.
Commands that can't be played back, such as mouse movements, are indicated by a black line or a red X in the History panel. Performing actions without the mouse may take some practice. See Edit Keyboard Shortcuts ( especially the Code Editing and Document Editing commands) for lists of keyboard commands. Remember that you can use the Tab key and arrow keys to navigate in dialog boxes and file lists, and any Windows menu command can be accessed using the Alt key.
22.214.171.124 Editing the Commands menu
To edit the name of a custom command or delete it at a later time, use Commands Edit Command List. You can't edit the actual commandsonly their names ; to change a command's operation, you must delete and recreate it.
Commands are shown in the order they were created. To change the order, edit the menus .xml file, which controls Dreamweaver's menus, directly. See Chapter 19 for details.
Use Commands Get More Commands to download additional commands, (i.e., Extensions) from the Dreamweaver Exchange. These commands are discussed in Chapter 22.
126.96.36.199 Recording a command
If you know you'll want to play back the steps you are about to take, record them using Commands Start Recording, Ctrl+Shift+X (Windows), or Cmd+Shift+X (Macintosh). This command records all of your keystrokes and object insertions until you select Commands Stop Recording or press Ctrl+Shift+X (Windows) or Cmd+Shift+X (Macintosh) again. While recording, the cursor looks like a cassette tape. Recorded commands aren't stored in the Commands menu but can be played back using Commands Play Recorded Command, Ctrl+P (Windows), or Cmd+P (Macintosh).