Using Keystrokes action
- Updated: 2022/12/04
Using Keystrokes action
Use the Keystrokes action to simulate keystrokes.
Procedure
Follow these steps to add a Keystrokes action:
Insert a wildcard character (*) in the Window title field to search for window titles that can change. You can specify one or more wildcards (*) at the start, middle, or end of the value. For example, to perform an operation on any window that has Microsoft in the title, use a wildcard to indicate any string by adding it before or after the value: *Microsoft*. The bot first searches for the exact window title (Microsoft), and if it does not find a match, it searches for windows with the term Microsoft anywhere in the title.
You can use a regular expression (regex) to identify a window title. Select the regular expression condition as either String or a Pattern and then enter the value. By default, the Window title field is case-sensitive.
- Notepad
, you can enter the
String value as * -Notepad, or use
Pattern value as
((\w)\s)*document-Notepad for only those window titles that
match this pattern. - When you use a regular expression of type String with -title as the input value for a window title in any action, the bot might encounter a run time error. To prevent the run time error, ensure that when you add the string input as *-title, the application with the specific title is open. The asterisk (*) is just a character, not a wild card character.
- When you use a regular expression of type Pattern with
-title as the input value for a window title in any
action, the bot might encounter a run time
error because the input value *-title is
incorrect.
Ensure that you use valid regex patterns.