Interpreting the Keystrokes in a Redirect File

The Redirect file format is an operating system-independent format which allows the creation of a demonstration or test script for a DP4 program. A Redirect file can be re-played to the DP4 program on any of the supported operating systems.

Redirect records a demonstration by adding one line to the file for each field that is accessed. The following information is stored:

<Map number> <Field number> <Option number> <Speed> Field input>

The information format is explained here:

Item

Description

Map number

The number of the map on the system or application database

Field number

The field number of the input field or menu option

Option number

One of three Redirect options:
1 is Continue
2 is Pause
3 is Display message and Pause

 

For option 3, the message is included in the file. Each line of the message starts with a lead-in character +, or * for the last line of the message

Speed

The length of the pause if option 2 or 3 is selected

Field input

The keystrokes entered for the field. Only the ASCII characters in the range 32 to 127 decimal (<Space> to <Del>) are recorded

This is an example Redirect file, run against the DP4 System menu utility:

250 1 1 3:DP4^M
+This Redirect script loads the DP4 System
+menu and runs a QA Build Customer Enquiry program on
*the SALESORD database
10100 1 1 3:q
+Run the QA Build interpreter, enter the database and
*program names
11100 1 1 3:i
801 2 1 3:prog9^M
*Select the Customer Enquiry option
1 1 1 3:e
3 1 1 3:^M
1 1 1 3:^M
*Retrieve the record for customer 20
1 1 1 3:20^M
1 1 1 3:^D
1 1 1 3:^M
*View the customer details
1 1 1 3:^[
1 1 1 3:^[
3 1 1 3:^[
1 2 1 3:x^[
11100 1 1 3:^[
10100 4 1 3:^[
*Escape to the operating system

The control codes are explained in this table:

Action Type

Description

Code

Menu and screen control

 

 

Escape

^[

Enter (accept field or select option)

^M

Tab (accept screen)

^I

Help toggle

^J

 

Help authoring mode toggle

^O

Cursor movement

 

 

Character right, character left

^D, ^S

 

Word right, word left

^F, ^A

 

Start of line, end of line

^Q, ^\

Line up, line down

^E, ^X

 

Scroll down, scroll up

^W, ^Z

 

Page up, page down

^R, ^C

Text editing

 

 

 

Enter (carriage return)

^M

Insert toggle

^V

Insert line

^N

Mark block

^K

 

Retrieve block

^L

 

Paint mode toggle

^P

 

Box drawing mode

^]

Insertion and deletion

 

 

Backspace

^H

Tab

^I

Delete character

^G

Delete word

^T

Delete line

^Y

Undo deletion

^U

Function keys and characters

 

 

Function keys <F1>, <F2> .. <F26>

\001, \002 .. \026

The characters \ and ^

\\, \^