Simulates typing on the keyboard.Syntax:
type <string> [with <key> [, <key> [, <key> ]]]
type field "output"
type allKeyboardKeys with shiftKey,optionKey
The type command does not automatically place an insertion point in a field, so if you want to simulate typing into a field, you must first use the select command to place the insertion point:
select after field "Data" type "Hello"
As the type command is designed to emulate exactly what happens when a user types a key on the keyboard, the rawKeyDown, keyDown, rawKeyUp and keyUp messages are sent by the command. If these messages are blocked, the text will not appear in the selected field.
- string (string):
- key:One of commandKey, controlKey, optionKey, or shiftKey. You can specifyup to three keys, separated by commas. (On Windows and Unix systems,commandKey indicates the Control key.)