AnyWin.
window.TypeKeys (sEvents [, nDelay, ensureFocus])
Variable | Description |
---|---|
sEvents | The keystrokes to type or mouse buttons to press. Mouse buttons are supported on the Classic Agent only. To specify mouse buttons, use <Button1>, <Button2>, or <Button3> in the string. STRING. |
nDelay | Optional: The delay between keystrokes (in seconds and fractions of seconds). NUMBER. |
ensureFocus |
Optional: Whether the agent brings the application to the foreground and then sets the keyboard focus to the control on which the method is executed. This is executed before the first key is typed, which means it is not rechecked for each keystroke when you specify multiple keys to be typed. This variable is supported only in scripts that use the Open Agent. By default, this variable is set to TRUE. BOOLEAN. |
//shift-right will be executed 6 times TextEditor.Document.TypeKeys ("<Shift-Right 6>")
//Shift-Right will be executed 6 times with a delay of 3 seconds before each execution TextEditor.Document.TypeKeys ("<Shift-Right 6>", 3)
//Selects all elements in the active field in Mozilla Firefox on macOS
BrowserWindow.TypeKeys ("Cmd+A")