Automating Tasks


The first step in automating any task is to identify what the fundamental steps are. Some steps you can automate, whereas others require a level of detail or attention that might not be suitable for automation. After you identify those tasks that can be automated, Fireworks 8 offers three sets of tools that can assist you:

  • Find and Replace Used to search for and replace elements within a file or multiple files. You can specify an asset, such as text, color, URLs, and fonts, and find and replace that asset in a PNG file.

  • Batch Process Used to convert entire groups of image files into other formats or to change their color palettes. Batch Process also applies custom optimization settings to groups of files and resizes a group of files.

  • Commands Used to create shortcuts for commonly used features or to create a script that can perform a complex series of steps.

Find and Replace

Find and Replace comes into play when you need to make global changes to elements of source PNG files. Elements that can be modified with Find and Replace include text, fonts, colors, and URLs.

Note that changes made with Find and Replace are undoable. For example, you search your source PNG files for the word "insomnia" and replace it with the word "sleeplessness." If you decide to change the word again, you cannot undo that change. However, you can run another Find and Replace. Run a find for the word "sleeplessness" and replace it with the original word "insomnia."

All Find and Replace commands are handled through the Find panel. Access it by choosing Window, Find or Edit, Find and Replace (see Figure 6.1). You can also use the Ctrl+F keyboard command to open the Find panel.

Figure 6.1. All Find and Replace operations are handled through the Find panel.


From the Search pop-up menu, choose a source for the search:

  • Search Selection Finds and replaces elements in the currently selected objects and text.

  • Search Frame Finds and replaces elements in only the current frame.

  • Search Document Finds and replaces elements in the active document.

  • Search Files Finds and replaces elements across multiple files.

From the Find pop-up menu, select an attribute for which to search. The options in the panel change according to your selection.

Next, click one of the following buttons to conduct a Find and Replace operation:

  • Find Locates the next instance of the element.

  • Replace Changes a found element with the contents of the Change To option.

  • Replace All Finds and replaces every instance of a found element in the search range.

As long as a file is not open, the act of replacing objects in multiple files automatically saves those changes. Unfortunately, this doesn't allow you to undo any changes that are made to documents that aren't open. To give yourself some extra insurance, you can create backups when you use Find and Replace in multiple files. With the Find panel open, click the Options menu in the top-right corner of the panel. Select Replace Options to launch the Replace Options dialog box (see Figure 6.2).

Figure 6.2. The Replace Options dialog box specifies how multiple-file Find and Replace operations are handled.


Select from among the following options:

  • Save and Close Files (if checked) This option has Fireworks save and close selected files that are not currently open when the Replace operation is completed.

  • Backup Original Files This option has three options to choose from: Select Choose No Backups to have no file backups made; select Overwrite Existing Backups to create one set of backups and overwrite them if multiple operations are performed; and choose Incremental Backups to create a set of backups for every Find and Replace operation completed.

Click OK to save the settings.

Batch Processing

Batch Processing is often performed as a series of simultaneous tasks on a group of files. In contrast to Find and Replace, Batch Processing is used on external files that you want to manipulate is some common way. This is usually used to export a series of files to fit a certain size, such as thumbnails and the larger images that they display.

The best way to create a batch process is to use the Batch Wizard by choosing File, Batch Process. The wizard presents three screens, enabling you to accomplish a batch process in a jiffy.

On the first screen (see Figure 6.3) you can add files that will be used to create the batch. Files can be added from more than one directory.

Figure 6.3. The first screen in the Batch Process Wizard is where you add files to create the batch.


When you have created the batch, click the Next button to continue.

The second screen (see Figure 6.4) is used to add tasks that tell Fireworks what to do to the files in the batch. The following are some of the most commonly used tasks:

  • Export This task specifies how the batch will be re-exported. When selected, all the export presets appear.

  • Scale This task scales the graphics to a specific size (such as thumbnails) to fit an area, or to a percentage.

  • Find and Replace This task opens the Batch Replace dialog box so you can use the Find and Replace operations in PNG files.

  • Rename This task enables you to add a prefix or suffix to the files.

  • Commands This task displays a list of some of the commands that you may use frequently when manipulating an image for the web.

Figure 6.4. The second screen in the Batch Process Wizard is where you add tasks that are to be applied to the batch.


When you have added your tasks, click the Next button to continue.

The last screen of the wizard (see Figure 6.5) is where you specify the files' output destination, as well as what should happen to the original files. If the results are satisfactory, you can even save the batch process as a script that you can use again to repeat the exact batch process in the future.

Figure 6.5. The third screen in the Batch Process Wizard is where you choose the output destination and specify the fate of the original files.


Make your selections and click the Batch button. Fireworks does all the work so you can kick back and take a much deserved break!



Special Edition Using Macromedia Studio 8
Special Edition Using Macromedia Studio 8
ISBN: 0789733854
EAN: 2147483647
Year: 2003
Pages: 337

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net