Text Workbench Online Help Submit feedback on this topic   

Scenario Editor Dialog

 Open Scenario Editor Dialog


Very often the search and replace operation requires that you replace different multiple strings in a file or files. You can do it by specifying the search and replace text consequently. This is a monotonous annoying routine. The HandyFile Find And Replace offers a neat solution to this problem - the Scenarios.

A Scenario is a set of search and replace text and conditions applied consequently to a file or files. Such a set of text and conditions is referred to as an Action. You can create a scenario using the Scenarios dialog.

Creating Scenarios

Follow the steps below to create and use a scenario.

  1. Click the New button to create a scenario. In the Name dialog box, provide a name for the scenario.
  2. Click the Add Action button to create a new action.
  3. Specify the sensible name for the action. This is essential if you want to edit your scenario some time later.
  4. Specify text and options for the action.
  5. Repeat steps 2 - 5 to create more actions.
  6. Click either Save and Activate or Save button. If you click Save and Activate, the new scenario will be activated.

Dialog Fields

The tables below describe the dialog fields.

Available Scenarios Group

Field Description
Scenario List A drop-down list containing the existing scenarios. Select the scenario by clicking on a drop-down arrow.
New Click to create a new scenario.
Copy Click to create a new scenario containing the same set of commands as the selected scenario; that is, copy the selected scenario.
Delete Click to delete the selected scenario.
Rename Click to assign a new name to a scenario.
Share This feature explores the teamwork functions.

Clicking this button will display a menu with the following commands:
  • Import Scenarios - opens the standard Windows file dialog, allowing you to select and import the previously exported scenario file (.hfsc) .
  • Export Scenarios - opens the Scenario Export Dialog, allowing you to select, export and optionally send the exported scenarios via the e-mail.

Scenario Actions Group

Field Description
Action List A list of actions in the current scenario. To display the action properties, simply select it. The action information includes its name, text to find, text to replace with and the options abbreviation (c - case, X - regular expressions, s - search only).
Add Action Click to add a new action to the scenario.
Duplicate Click to create a new action and copy the currently selected action into the created one.
Remove Selected Click to remove the selected action from the selected scenario.
Move Up Click to move the selected action upwards. Press and hold the button down to start continuously moving the action up.
Move Down Click to move the selected action downwards. Press and hold the button down to start continuously moving the action down.
Import Strings Opens a file selection dialog where you can select a .txt or .csv file whose content (search and replace strings) is to be added to the current scenario. After you selected a file, the Search and Replace Strings Import Dialog is displayed where you can specify the import rules.

Action Properties Group

Field Description
Name Name of the selected action.
Find What
button
Click this button to open the Multiline Editor dialog. This dialog allows entering text with multiple lines in normal mode, converting line breaks to \r and \n as appropriate.
Find What
text field
This field is used to enter the text to search for.
Replace With
button
Same purpose as for Find What button, but applies to the replacement text.
Replace With
text field
Same purpose as for Find What text field, but applies to the replacement text.

Note
Generally, it is not necessary to escape non-alphabetical symbols except backslash (\) in the Replace With field if replacing with the Regular Expressions, but doing so is highly recommended to avoid collisions.

Control Escape
buttons
If you have the option Regular Expressions selected, shows a menu with regular expressions that you can select and insert.

If the Regular Expressions option is not selected, shows a menu with common control escapes.
Regular Expression Laboratory
button
Opens the Regular Expression Laboratory window, where you can test your regular expressions.
Case-sensitive search Checking this button allows restrict your searches to those phrases that match the sought text exactly.

If using Regular Expressions, you can control case sensitivity with the regular expression switches. See more information on Regular Expressions.

Regular expressions Check this button to allow searches with Regular Expressions.
Search only If you check this button, no replacements will occur even if the sought text is found. Useful for simply locating files with the required text.
Repeat this action Specify here how many times the selected action will iterate. Allows to replace the repetitive blocks of text. The default repetition count is 1.

Common Controls

Control Description
Save and Activate Saves changes and sets the current scenario active in the main application window. 
Save Saves changes and closes the dialog.
Cancel Closes the dialog discarding changes.
Help Shows this help.