When you begin recording a script in the Windows Recorder, you can select Keystrokes or FormFill for recording what you type:
- Keystrokes – Each character is recorded in a separate Type action.
- FormFill – The entire string you type (for example, in a form field) is recorded in a single action.
The Type action uses the following settings to record the character:
Text – The cumulative characters that you typed: The first Type action displays the first character, the second displays the two characters, the third displays the three characters, etc.
Keystrokes – The underlying code(s) for all the keys you pressed while the action was being recorded, including any corrections.
Keystroke Modifiers – Shift, Control, Alt, or Meta
Target Window – The window where the click occurs.
Locators – The elements to be clicked.
The Keystrokes field displays the following information:
- The character you typed, or a representation of a key such as Backspace, Delete, or a cursor key.
- Char Code – The ASCII value for the character. This property is case-sensitive: the value for a is different from the value for A.
- Key Code – The identifier for the key that was pressed. This property is not case-sensitive; for example, lowercase a and uppercase A generate the same key code.
- Selection Range Index – Two values that define the index within the text element at which the keystroke begins and the index within the text element at which the keystroke ends.
You typed an H when you intended to type G, so you press the Backspace key and then type the G.
- The first Type action records the H.
The Text field displays H.
The Keystrokes field displays one row of values for the H.
- The second Type action records the backspace and the G.
The text field displays G.
The Keystrokes field displays two rows: the first row contains the values for the backspace, and the second contains the values for the G.
- When Type actions record the string you type in a field, the Text field for each subsequent Type action displays the cumulative characters. For example, if you type Hopper and each character is recorded by a separate Type action:
The Keystrokes field for each Type action displays the values for only the character recorded by that action.
- The first Type action records the H and its Text field displays H.
- The next Type action records o and its Text field displays Ho.
- The third records p and its Text field displays Hop; and so on.
- If you type quickly, a Type action may record more than one character. For example, you type Grace Hopper:
- The first Type action records G: the Keystrokes field contains one row that displays the values for G.
- The second Type action records rac: the Keystrokes field contains three rows, one for each character recorded. (The Text field displays everything typed so far: Grace.)
- The third Type action records e and the space: the Keystrokes field contains two rows, the first with values for the e and the second for the space. (The Text field contains all the characters typed so far, including the space.)