## WorkShop Visual Replay Tutorial

This is a set of step-by-step instructions which demonstrates how to use WorkShop Visual Replay to record interaction with the visu_config tool and then replay those actions.

1. Select "WorkShop Visual Replay" from the "Tools" menu.

2. Type visu_config into the Command field of the Command Execution Dialog and press "Ok".

This runs visu_config and displays the WorkShop Visual Replay dialog alongside it.

3. Press the "New Script" button.

   This creates an "unnamed" script.

4. Enter a name for the script in the New Script text field, followed by a carriage return.

   The name of the script is changed accordingly.

5. Press the "Monitor" button.

   This brings up a dialog showing a log of all the actions for the session.

6. Press the Record button.

7. Use the application.

   Perform the following actions:

   - Enter "one" in the Selection text field and press Return.

     The name is added to the "Families" list.

   - Double click over the name "one" in the Selection field, type "two" and press Return.

     The Families list now contains two entries.

   - Click on "one" in the Families list and press the "Edit" button.

     The "Widget Classes" dialog is displayed.

   - Enter "WidgetOne" in the Selection text field and press Return.

     The name is added to the "Widget classes" list.

   - Double-click "WidgetOne" in the Widget classes list.

     This displays the Widget dialog.

   - Press the "Close" button in the Widget dialog.

   - Press the "Close" button in the Widget Classes dialog.

   - Select the "Stop list" option from the "Edit" menu in the Families dialog.

     This displays the Stop list dialog.

   - Press the toggles labelled "Pulldown Menu" and "Text Field" in the Stop list dialog.

   - Press the "Apply" button followed by the "Close" button.

   - Select "New" from the File menu in the Families dialog.

     The "Save changes" warning dialog is displayed.

   - Press the "No" button in the Save changes dialog.

8. Press the "Stop" button

   The "Record" and "Rewind" buttons become sensitive. All the other buttons become insensitive.

   A file has been created containing a record of your actions. This file can be replayed at any time. For the purposes of this tutorial, we are going to play it back straight away.

9. Press the "Rewind" button.

   The record, insert, play and single step buttons become sensitive.

10. Press the "Play" button.

    You can now see what you have recorded. Using the fast/slow slider in the WorkShop Visual Replay dialog, you can change the rate at which your session plays back.

11. Press the "Rewind" button.

12. Press the "Single step" button.

    Using this button you can single step through each command in the record script. This is more informative if you have the Monitor window on the screen. As each step is replayed it is printed in the Monitor window.

13. Exit visu_config.

    Select "No" when you are asked if you wish to save the changes. The record session ends when the application exits. The WorkShop Visual Replay dialog is also dismissed. This is because the dialog is, in effect, part of the visu_config program.

## The Contents of the Script

The example above produces the following script:

    	in ApplicationShell
    		push Text
    		type one
    		key Return
    		doubleclick Text
    		type two
    		key Return
    		push ItemsList(`one',1)
    		push family_selection.OK
    	in entity_dialog
    		push Text#5
    		type WidgetOne
    		push widgetlist_selection.OK
    		doubleclick ItemsList#5(`WidgetOne',1)
    	in widgetedit_dialog
    		push widgetedit_closeb
    	in entity_dialog
    		push widgetlist_selection.widgetlist_quitb
    	in ApplicationShell
    		cascade family_editb
    			select family_stop_b
    	in stop_list_shell
    		push stop_pulldown_menu
    		push stop_text_field
    		push stop_apply
    		push stop_close
    	in ApplicationShell
    		cascade family_fileb
    			select family_newb
    	in savechanges_dialog
    		push savechanges_messagebox.Cancel

Note - The file you created may not be exactly the same as this one because you may have performed the actions in a slightly different order or you may have made mistakes and gone back to correct them. All of this is recorded.

See also:

- WorkShop Visual Replay Interface Operation
- WorkShop Visual Replay Command Line Operation
- WorkShop Visual Replay Tips and Hints