Windows
(Available from version 7.0 onwards.)
Note on Windows Functions and Screen Elements
The functions included in the Windows built-in service can operate on any open window. You do not have to capture the window as a screen element to use these functions.
However, many of these functions identify the window on which to operate by its handle number. If you have captured the window as a screen element, you can use the window's Window Handle property to identify the window.
For example, after capturing an Internet Explorer window to www.google.com, the window's Window Handle property is listed under the TABWINDOWSCLASS element.
That property is used in the workflow below to retrieve the caption of the window.
Note that the relevant element in the screen element hierarchy must be set to be available for use for its properties to be usable.
Functions
Brings the window with the specified handle to the front.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
handle |
Number |
The window handle, for the window to be brought to the front. |
Returns
Nothing.
Example
This example brings the window with handle 527128 to the front.
Checks if the specified process exists, and returns true if it does.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
processName |
Text |
The process name to check. |
Returns
Returns True if the process exists, or False if not.
Example
This example returns True if Chrome is running, into the Boolean variable SVBoolean001.
Checks if the window handle is valid, and returns true for a valid handle.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
handle |
Number |
The window handle to test. |
Returns
Returns True or False.
Example
This example returns False (assuming Window handle 6357174 does not exist) into the Boolean variable SVBoolean001.
Checks if a window with the given caption text is available. If the window exists, return true, otherwise, it returns false.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
windowCaption |
Text |
The window caption to look for. |
Returns
Returns True if the window caption is found, or False if not.
Example
This example tests whether a window with a Calculator caption is available, and returns the result into the Boolean variable SVBoolean001.
Enables or disables the window with the specified window handle.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
windowHandle |
Number |
The window handle to enable or disable. |
Enable |
Boolean |
True or False. |
Returns
Nothing.
Example
This example enables the Window handle 6357174.
Returns the name value of the accessible object retrieved from the specified handle.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
handle |
Number |
The Window handle. |
Returns
Returns the name value of the accessible object retrieved from the specified handle as text.
Example
This example returns the accessible object name from the Window handle 6356371 into the text variable SVText001.
Gets the visibility value of accessible object retrieved from the specified handle.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
handle |
Number |
The Window handle. |
Returns
Returns visibility value of the accessible object retrieved from the specified Window handle as True or False.
Example
This example returns the accessible object visibility status of the Window handle 6356361 into the Boolean variable SVBoolean001 as True or False.
Gets the name of the active process.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
None |
|
|
Returns
Returns the name of the active process as text.
Example
This example returns the active process name into the text variable SVText001.
Gets the child window of a parent window with a specified handle. Identify the child window to get by its class name.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
handle |
Number |
The parent handle. |
className |
Text |
The class name. |
Returns
Returns the child window handle of a parent window with a specified handle and a class name.
Example
This example returns the child window handle of the parent window with handle 6316365 and class name WindowHandleInfo into the number variable SVNumber001.
Gets the descendant window of a parent window with a specified handle. Identify the child window to get by its class name and caption.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
handle |
Number |
The parent handle. |
className |
Text |
The class name. |
caption |
Text |
The window caption to look for. |
Ignore caption case |
Boolean |
Whether to ignore the case of the caption text |
Returns
Returns the window handle of the descendant window as a number.
Example
The Notepad window shown below has a child window with a Class of Edit and an empty Caption. (For verification, note that the Zero Dump window below shows that the handle of the Edit area is 0x1513D4, which is the hexadecimal equivalent of 1381332.)
This workflow retrieves the window handle of the Edit area of the Notepad application and writes it to the number variable Desc_Window_Handle.
After running the workflow, the variable Desc_Window_Handle is set to 1381332, which is the value shown by Zero Dump above.
Gets the vertical extent of the bottom of the window with the specified handle relative to the top of the base window.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
hwnd_relative |
Number |
The specified window handle. |
hwnd_base |
Number |
The base window handle. |
Returns
Returns the vertical extent of the bottom of the specified window relative to the top of the base window as a number.
Example
Two windows are shown. The window at the top-left is the base window, with handle 463426. The window at the bottom right is the relative window, with handle 923868.
The workflow below measures all four distances between the two windows and assigns them to four variables of type Number.
When executed, the values are measured.
Gets the horizontal extent of the left position of the window with the specified handle relative to the base window.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
hwnd_relative |
Number |
The specified window handle. |
hwnd_base |
Number |
The base window handle. |
Returns
Returns the left horizontal extent of the specified window relative to the base window as a number.
Example
See the example for Get Distance to Bottom of Window.
Gets the horizontal extent of the right position of the window with the specified handle relative to the left of the base window.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
hwnd_relative |
Number |
The specified window handle. |
hwnd_base |
Number |
The base window handle. |
Returns
Returns the horizontal extent of the right of the specified window relative to the base window as a number.
Example
See the example for Get Distance to Bottom of Window.
Gets the vertical extent of the top of the window with the specified handle relative to base window.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
hwnd_relative |
Number |
The specified window handle. |
hwnd_base |
Number |
The base window handle. |
Returns
Returns the vertical extent of the top of the specified window relative to the base window as a number.
Example
See the example for Get Distance to Bottom of Window.
Gets the handle of the current window in focus.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
None |
|
|
Returns
Returns the handle of the current window in focus, as a number.
Example
This example returns the handle of the window in focus into the number variable SVNumber001.
Gets the name of the window currently in focus.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
None |
|
|
Returns
Returns the name of the window currently in focus into text variable SVText002.
Example
Gets a list of Internet Explorer window handles that include the specified window captions.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
windowTitles |
List |
The specified window captions. |
Returns
Returns the list of Internet Explorer window handles.
Example
Gets the Internet Explorer window handle with the title containing the specified text.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
windowText |
Text |
The window title. |
Returns
Returns the window handle of the Internet Explorer window containing the specified text in the title.
Example
This example returns the Window handle of the Internet Explorer window having nice inContact in its title, into the number variable SVNumber001.
Gets a list of the accessibility children text for the specified window handle within the specified client role control.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
handle |
Number |
The specified window handle. |
clientRole |
Text |
The specified client role. |
Returns
Returns a list of accessibility children text for the specified window handle.
Example
This example returns the list of accessibility children text for the window handle 6356362 within the calendar control into the list variable LVText001.
Gets the caption of the main window of the specified process name. If more than one process is available, the application refers to the first instance of the process.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
processName |
Text |
The process name. |
Returns
Returns the caption of the main window of the specified application process as text. If more than one process is available, it refers to the first instance of the process.
Example
This example returns the main window caption of the acrobat.exe process into the text variable SVText001.
Retrieves a list of all the open window titles.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
None |
|
|
Returns
Returns the list of open window titles.
Example
This example returns the list of all the open window titles into the list variable LVText001.
Gets the parent window handle of the window with the specified handle.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
handle |
Number |
The Window handle. |
Returns
Returns the parent window handle as a number.
Example
This example returns the parent window handle of the window with handle 6316365 into the number variable SVNumber001.
Gets the CPU usage of a process identified by its process number.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
id |
Number |
The process number |
Returns
The percentage CPU usage for the process in Number format
Example
In this example, the CPU usage of Microsoft Paint is continually measured.
The workflow is shown below.
For this example, the ID was taken from Task Manager:
As the user draws in Paint, the value of the variable CPUUsageById is continually updated.
Gets the CPU usage of a process identified by its name and the user.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
name |
Text |
The name of the process |
user |
Text |
The name of the user |
Returns
Returns the percentage CPU usage for the process and user, as text.
Example
This example writes the CPU usage percentage for the process named EXCEL..EXE for the user markl to the variable ProcessCPU.
Gets the window text of a window identified by its handle.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
handle |
Number |
The window handle |
Returns
Returns the window text.
Example
This example gets the handle number of the in-focus window. It then gets the window text of that window and writes it to the WindowText variable.
Gets the window handle of the window with the specified class name and with the specified text.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
className |
Text |
The class name. |
windowText |
Text |
The window text. |
Returns
The window handle in Number format
Example
This example retrieves the handle of the Notepad window identified by its caption (Customer Data.txt - Notepad) and its class (Notepad). The zero Dump window shown alongside displays the window's caption, class, and handle.
The workflow retrieves the Notepad window's handle as a decimal value. It then converts that to a hexadecimal value so that we can check it against the handle value provided by zero Dump.
In debug mode, we can see that the WindowHandleHex value matches the handle provided by zero Dump.
Holds the special keys: ALT, CTRL, Shift, and Windows.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Alt |
Boolean |
The ALT key. |
Ctrl |
Boolean |
The CTRL key. |
Shift |
Boolean |
The Shift key. |
Windows |
Boolean |
The Window key. |
Returns
Nothing.
Example
Maximizes the window with the specified handle.
This function does not activate the window and it does not bring the window to the front. For example, if the window is currently minimized and inactive, no change will be seen when this function is performed. However, when the function Bring to Front is performed, the window will display maximized.
Similarly, if you use this function to maximize an inactive browser tab, the browser window itself will be maximized but the browser tab will not become active until you activate it, for example, using Activate Tab by Title.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
handle |
Number |
The window handle. |
Returns
Nothing.
Example
This example maximizes the window with handle 6356361.
Minimize the window with the specified handle.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
handle |
Number |
The window handle. |
Returns
Nothing.
Example
This example minimizes the window with handle 6356361.
Posts a specified message with specified parameters to the window with the specified handle. Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
message |
Number |
The message number. |
wParam |
Number |
Additional message-specific information. |
lParam |
Number |
Additional message-specific information. |
handle |
Number |
The window handle. |
Returns
Nothing.
Example
Presses the specified keyboard key.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Key |
Number |
The keyboard key number. |
0 | No key pressed | |
1 | Left mouse button | |
2 | Right mouse button | |
3 | CANCEL key | |
4 | Middle mouse button (three-button mouse) | |
5 | First x mouse button (five-button mouse) | |
6 | Second x mouse button (five-button mouse) | |
8 | BACKSPACE key | |
9 | TAB key | |
10 | LINEFEED key | |
12 | CLEAR key | |
13 | RETURN key | |
13 | ENTER key | |
16 | SHIFT key | |
17 | CTRL key | |
18 | ALT key | |
19 | PAUSE key | |
20 | CAPS LOCK key | |
21 | IME Kana/Hanguel/ Hangul mode key | |
23 | IME Junja mode key | |
24 | IME final mode key | |
25 | IME Hanja mode key | |
25 | IME Kanji mode key | |
27 | ESC key | |
28 | IME convert key | |
29 | IME nonconvert key | |
30 | IME accept key | |
31 | IME mode change key | |
32 | SPACEBAR | |
33 | PAGE UP key | |
34 | PAGE DOWN key | |
35 | END key | |
36 | HOME key | |
37 | LEFT ARROW key | |
38 | UP ARROW | |
39 | RIGHT ARROW key | |
40 | DOWN ARROW key | |
41 | SELECT key | |
42 | PRINT key | |
43 | EXECUTE key | |
44 | PRINT SCREEN key | |
45 | INS key | |
46 | DEL key | |
47 | HELP key | |
48 | 0 key | |
49 | 1 key | |
50 | 2 key | |
51 | 3 key | |
52 | 4 key | |
53 | 5 key | |
54 | 6 key | |
55 | 7 key | |
56 | 8 key | |
57 | 9 key | |
65 | A key | |
66 | B key | |
67 | C key | |
68 | D key | |
69 | E key | |
70 | F key | |
71 | G key | |
72 | H key | |
73 | I key | |
74 | J key | |
75 | K key | |
76 | L key | |
77 | M key | |
78 | N key | |
79 | O key | |
80 | P key | |
81 | Q key | |
82 | R key | |
83 | S key | |
84 | T key | |
85 | U key | |
86 | V key | |
87 | W key | |
88 | X key | |
89 | Y key | |
90 | Z key | |
91 | Left Windows logo key (Microsoft Natural Keyboard) | |
92 | Right Windows logo key (Microsoft Natural Keyboard) | |
93 | Application key (Microsoft Natural Keyboard) | |
95 | Computer sleep key | |
96 | 0 key on numeric keypad | |
97 | 1 key on numeric keypad | |
98 | 2 key on numeric keypad | |
99 | 3 key on numeric keypad | |
100 | 4 key on numeric keypad | |
101 | 5 key on numeric keypad | |
102 | 6 key on numeric keypad | |
103 | 7 key on numeric keypad | |
104 | 8 key on numeric keypad | |
105 | 9 key on numeric keypad | |
106 | Multiply key | |
107 | Add key | |
108 | Separator key | |
109 | Subtract key | |
110 | Decimal key | |
111 | Divide key | |
112 | F1 key | |
113 | F2 key | |
114 | F3 key | |
115 | F4 key | |
116 | F5 key | |
117 | F6 key | |
118 | F7 key | |
119 | F8 key | |
120 | F9 key | |
121 | F10 key | |
122 | F11 key | |
123 | F12 key | |
124 | F13 key | |
125 | F14 key | |
126 | F15 key | |
127 | F16 key | |
128 | F17 key | |
129 | F18 key | |
130 | F19 key | |
131 | F20 key | |
132 | F21 key | |
133 | F22 key | |
134 | F23 key | |
135 | F24 key | |
144 | NUM LOCK key | |
145 | SCROLL LOCK key | |
160 | Left SHIFT key | |
161 | Right SHIFT key | |
162 | Left CTRL key | |
163 | Right CTRL key | |
164 | Left ALT key | |
165 | Right ALT key | |
166 | Browser back key (Windows 2000 or later) | |
167 | Browser forward key (Windows 2000 or later) | |
168 | Browser refresh key (Windows 2000 or later) | |
169 | Browser stop key (Windows 2000 or later) | |
170 | Browser search key (Windows 2000 or later) | |
171 | Browser favorites key (Windows 2000 or later) | |
172 | Browser home key (Windows 2000 or later) | |
173 | Volume mute key (Windows 2000 or later) | |
174 | Volume down key (Windows 2000 or later) | |
175 | Volume up key (Windows 2000 or later) | |
176 | Media next track key (Windows 2000 or later) | |
177 | Media previous track key (Windows 2000 or later) | |
178 | Media Stop key (Windows 2000 or later) | |
179 | Media play pause key (Windows 2000 or later) | |
180 | Launch mail key (Windows 2000 or later) | |
181 | Select media key (Windows 2000 or later) | |
182 | Start application one key (Windows 2000 or later) | |
183 | Start application two key (Windows 2000 or later) | |
186 | OEM Semicolon key on a US standard keyboard (Windows 2000 or later) | |
186 | OEM 1 key | |
187 | OEM plus key on any country/region keyboard (Windows 2000 or later) | |
188 | OEM comma key on any country/region keyboard (Windows 2000 or later) | |
189 | OEM minus key on any country/region keyboard (Windows 2000 or later) | |
190 | OEM period key on any country/region keyboard (Windows 2000 or later) | |
191 | OEM question mark key on a US standard keyboard (Windows 2000 or later) | |
191 | OEM 2 key | |
192 | OEM tilde key on a US standard keyboard (Windows 2000 or later) | |
192 | OEM 3 key | |
219 | OEM open bracket key on a US standard keyboard (Windows 2000 or later) | |
219 | OEM 4 key | |
220 | OEM pipe key on a US standard keyboard (Windows 2000 or later) | |
220 | OEM 5 key | |
221 | OEM close bracket key on a US standard keyboard (Windows 2000 or later) | |
221 | OEM 6 key | |
222 | OEM singled/double quote key on a US standard keyboard (Windows 2000 or later) | |
222 | OEM 7 key | |
223 | OEM 8 key | |
226 | OEM angle bracket or backslash key on RT 102 key keyboard (Windows 2000 or later) | |
226 | OEM 102 key | |
229 | PROCESS KEY key | |
231 | Used to pass Unicode characters as if they were keystrokes. Packet key value is low word of a 32-bit virtual-key value used for non-keyboard input methods | |
246 | ATTN key | |
247 | CRSEL key | |
248 | EXSEL key | |
249 | ERASE EOF key | |
250 | PLAY key | |
251 | ZOOM key | |
252 | A constant reserved for future use | |
253 | PA1 key | |
254 | CLEAR key | |
65535 | Bitmask to extract a key code from a key value | |
65536 | SHIFT modifier key | |
131072 | CTRL modifier key | |
262144 | ALT modifier key |
Returns
Nothing.
Example
This example presses the CLEAR key.
Releases the special keys: ALT, CTRL, Shift, and Windows.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Alt |
Boolean |
The ALT key. |
Ctrl |
Boolean |
The CTRL key. |
Shift |
Boolean |
The Shift key. |
Windows |
Boolean |
The Window key. |
Returns
Nothing.
Example
Restores the window with the specified handle.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
handle |
Number |
The window handle. |
Returns
Nothing.
Example
This example restores the window with handle 6356361.
Sends a specified command message to the window with the specified handle. Used to simulate WM_Command messaging.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
id |
Number |
The message number. |
handle |
Number |
The window handle. |
Returns
Nothing.
Example
This workflow sends command with ID 2 to the Notepad edit window. This command opens the Open dialog in Notepad.
After running the workflow, the Open dialog opens.
Simulates a keyboard key press in the specified window. The modifiers Ctrl, Alt, and Shift are supported, allowing you to specify key combinations such as Ctrl-C and Alt-F.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Alt |
Boolean |
Set to True to include Alt in the key combination, otherwise set to False. |
Ctrl |
Boolean |
Set to True to include Ctrl in the key combination, otherwise set to False. |
Shift |
Boolean |
Set to True to include Shift in the key combination, otherwise set to False. |
Key Number |
Number |
The numeric key code of the key to be pressed. See the table below. |
Window Handle | Number | The window handle of the window to which the key combination must be sent. |
Key Code Values
The table below lists the key codes for use in the Key Number parameter.
Key Name |
Key Code |
---|---|
No key pressed. | 0 |
The left mouse button. | 1 |
The right mouse button. | 2 |
The CANCEL key. | 3 |
Key Name |
Key Code |
---|---|
The middle mouse button (three-button mouse). | 4 |
The first x mouse button (five-button mouse). | 5 |
The second x mouse button (five-button mouse). | 6 |
The BACKSPACE key. | 8 |
The TAB key. | 9 |
The LINEFEED key. | 10 |
The CLEAR key. | 12 |
The RETURN key. | 13 |
The ENTER key. | 13 |
The SHIFT key. | 16 |
The CTRL key. | 17 |
The ALT key. | 18 |
The PAUSE key. | 19 |
The CAPS LOCK key. | 20 |
The CAPS LOCK key. | 20 |
The IME Kana mode key. | 21 |
The IME Hanguel mode key. (maintained for compatibility; use HangulMode) | 21 |
The IME Hangul mode key. | 21 |
The IME Junja mode key. | 23 |
The IME final mode key. | 24 |
The IME Hanja mode key. | 25 |
The IME Kanji mode key. | 25 |
The ESC key. | 27 |
The IME convert key. | 28 |
The IME nonconvert key. | 29 |
The IME accept key, replaces System.Windows.Forms.Keys.IMEAccept. | 30 |
The IME accept key. Obsolete, use System.Windows.Forms.Keys.IMEAccept instead. | 30 |
The IME mode change key. | 31 |
The SPACEBAR key. | 32 |
The PAGE UP key. | 33 |
The PAGE UP key. | 33 |
The PAGE DOWN key. | 34 |
The PAGE DOWN key. | 34 |
The END key. | 35 |
The HOME key. | 36 |
The LEFT ARROW key. | 37 |
The UP ARROW key. | 38 |
The RIGHT ARROW key. | 39 |
The DOWN ARROW key. | 40 |
The SELECT key. | 41 |
The PRINT key. | 42 |
The EXECUTE key. | 43 |
The PRINT SCREEN key. | 44 |
The PRINT SCREEN key. | 44 |
The INS key. | 45 |
The DEL key. | 46 |
The HELP key. | 47 |
The 0 key. | 48 |
The 1 key. | 49 |
The 2 key. | 50 |
The 3 key. | 51 |
The 4 key. | 52 |
The 5 key. | 53 |
The 6 key. | 54 |
The 7 key. | 55 |
The 8 key. | 56 |
The 9 key. | 57 |
The A key. | 65 |
The B key. | 66 |
The C key. | 67 |
The D key. | 68 |
The E key. | 69 |
The F key. | 70 |
The G key. | 71 |
The H key. | 72 |
The I key. | 73 |
The J key. | 74 |
The K key. | 75 |
The L key. | 76 |
The M key. | 77 |
The N key. | 78 |
The O key. | 79 |
The P key. | 80 |
The Q key. | 81 |
The R key. | 82 |
The S key. | 83 |
The T key. | 84 |
The U key. | 85 |
The V key. | 86 |
The W key. | 87 |
The X key. | 88 |
The Y key. | 89 |
The Z key. | 90 |
The left Windows logo key (Microsoft Natural Keyboard). | 91 |
The right Windows logo key (Microsoft Natural Keyboard). | 92 |
The application key (Microsoft Natural Keyboard). | 93 |
The computer sleep key. | 95 |
The 0 key on the numeric keypad. | 96 |
The 1 key on the numeric keypad. | 97 |
The 2 key on the numeric keypad. | 98 |
The 3 key on the numeric keypad. | 99 |
The 4 key on the numeric keypad. | 100 |
The 5 key on the numeric keypad. | 101 |
The 6 key on the numeric keypad. | 102 |
The 7 key on the numeric keypad. | 103 |
The 8 key on the numeric keypad. | 104 |
The 9 key on the numeric keypad. | 105 |
The multiply key. | 106 |
The add key. | 107 |
The separator key. | 108 |
The subtract key. | 109 |
The decimal key. | 110 |
The divide key. | 111 |
The F1 key. | 112 |
The F2 key. | 113 |
The F3 key. | 114 |
The F4 key. | 115 |
The F5 key. | 116 |
The F6 key. | 117 |
The F8 key. | 119 |
The F9 key. | 120 |
The F10 key. | 121 |
The F11 key. | 122 |
The F12 key. | 123 |
The F13 key. | 124 |
The F14 key. | 125 |
The F15 key. | 126 |
The F16 key. | 127 |
The F17 key. | 128 |
The F18 key. | 129 |
The F19 key. | 130 |
The F20 key. | 131 |
The F21 key. | 132 |
The F22 key. | 133 |
The F23 key. | 134 |
The F24 key. | 135 |
The NUM LOCK key. | 144 |
The SCROLL LOCK key. | 145 |
The left SHIFT key. | 160 |
The right SHIFT key. | 161 |
The left CTRL key. | 162 |
The right CTRL key. | 163 |
The left ALT key. | 164 |
The right ALT key. | 165 |
The browser back key (Windows 2000 or later). | 166 |
The browser forward key (Windows 2000 or later). | 167 |
The browser refresh key (Windows 2000 or later). | 168 |
The browser stop key (Windows 2000 or later). | 169 |
The browser search key (Windows 2000 or later). | 170 |
The browser favorites key (Windows 2000 or later). | 171 |
The browser home key (Windows 2000 or later). | 172 |
The volume mute key (Windows 2000 or later). | 173 |
The volume down key (Windows 2000 or later). | 174 |
The volume up key (Windows 2000 or later). | 175 |
The media next track key (Windows 2000 or later). | 176 |
The media previous track key (Windows 2000 or later). | 177 |
The media Stop key (Windows 2000 or later). | 178 |
The media play pause key (Windows 2000 or later). | 179 |
The launch mail key (Windows 2000 or later). | 180 |
The select media key (Windows 2000 or later). | 181 |
The start application one key (Windows 2000 or later). | 182 |
The start application two key (Windows 2000 or later). | 183 |
The OEM Semicolon key on a US standard keyboard (Windows 2000 or later). | 186 |
The OEM 1 key. | 186 |
The OEM plus key on any country/region keyboard (Windows 2000 or later). | 187 |
The OEM comma key on any country/region keyboard (Windows 2000 or later). | 188 |
The OEM minus key on any country/region keyboard (Windows 2000 or later). | 189 |
The OEM period key on any country/region keyboard (Windows 2000 or later). | 190 |
The OEM question mark key on a US standard keyboard (Windows 2000 or later). | 191 |
The OEM 2 key. | 191 |
The OEM tilde key on a US standard keyboard (Windows 2000 or later). | 192 |
The OEM 3 key. | 192 |
The OEM open bracket key on a US standard keyboard (Windows 2000 or later). | 219 |
The OEM 4 key. | 219 |
The OEM pipe key on a US standard keyboard (Windows 2000 or later). | 220 |
The OEM 5 key. | 220 |
The OEM close bracket key on a US standard keyboard (Windows 2000 or later). | 221 |
The OEM 6 key. | 221 |
The OEM singled/double quote key on a US standard keyboard (Windows 2000 or later). | 222 |
The OEM 7 key. | 222 |
The OEM 8 key. | 223 |
The OEM angle bracket or backslash key on the RT 102 key keyboard (Windows 2000 or later). | 226 |
The OEM 102 key. | 226 |
The PROCESS KEY key. | 229 |
Used to pass Unicode characters as if they were keystrokes. The Packet key value is the low word of a 32-bit virtual-key value used for non-keyboard input methods. | 231 |
The ATTN key. | 246 |
The CRSEL key. | 247 |
The EXSEL key. | 248 |
The ERASE EOF key. | 249 |
The PLAY key. | 250 |
The ZOOM key. | 251 |
A constant reserved for future use. | 252 |
The PA1 key. | 253 |
The CLEAR key. | 254 |
The bitmask to extract a key code from a key value. | 65535 |
The SHIFT modifier key. | 65536 |
The CTRL modifier key. | 131072 |
The ALT modifier key. | 262144 |
Returns
Nothing.
Example
This workflow:
-
Enters the letter a (key code 65) into the editing area of a Notepad window.
-
Simulates pressing Ctrl-P (key code 80 with Ctrl set to True) to open the Print menu.
The letter a is entered and the Print menu is opened.
Sends a specified message with specified parameters to the window with the specified handle. This function calls the window procedure for the specified window and waits until the window procedure has processed the message.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
message |
Number |
The message number. |
wParam |
Number |
Additional message-specific information. |
lParam |
Number |
Additional message-specific information. |
handle |
Number |
The window handle. |
Returns
Nothing.
Example
Sends a specified string to the window with the specified handle.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Str |
Text |
The string content. |
handle |
Number |
The window handle. |
Returns
Nothing.
Example
This example sends the string Hello World to the window with handle 6356361.
Send specified text to the window with the specified handle.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Text |
Text |
The text content. |
handle |
Number |
The window handle. |
Returns
Nothing.
Example
This example sends the text Hello to the window with handle 6356365.
Sets the focus to the main window of the specified process.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
processName |
Text |
The process name. |
Returns
Nothing.
Example
This example returns True if the focus is set to the main window with the process acrobat.exe, into the Boolean variable SVBoolean001.
Sets the focus to the window with the specified caption.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
windowText |
Text |
The window caption. |
Returns
Nothing.
Example
This example returns True if the focus is set to the window with caption NICE inContact, into the Boolean variable SVBoolean001.
Sets the position, size, and Z order of the window with the specified handle.
The parameters are the same as the parameters for Microsoft's SetWindowPos function.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
handle |
Number |
The handle of the window to be positioned |
handleInsertAfter |
Number |
Sets the Z order of the window. Either specify the handle of the window to precede the positioned window in the Z order, or one of the following values: 1: Place the window at the bottom of the Z order -2: Place the window above all non-topmost windows 0: Place the window at the top of the Z order -1: Place the window above all non-topmost windows |
x |
Number |
The new position of the left side of the window, in client coordinates |
y |
Number |
The new position of the top of the window, in client coordinates |
cx |
Number |
The new width of the window, in pixels |
cy |
Number |
The new height of the window, in pixels |
flags |
Number |
The window sizing and positioning flags. See Microsoft's documentation of the SetWindowPos function. |
Returns
A Boolean value indicating whether the window was successfully repositioned or not
Example
In this example, the Paint window is repositioned and resized.
Location and size before:
Location and size after:
The variable Respositioned is set to true as the operation was successful.
Sets the window with the specified handle to a specified show state. See https://msdn.microsoft.com/en-us/library/windows/desktop/ms633548(v=vs.85).aspx.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
windowHandle |
Number |
The window handle. |
commandShow |
Number |
The show state number. |
Returns
Nothing.
Example
This example sets the window with handle 6356361 to show state number 13.
Pauses the real-time client processing for the time specified in milliseconds (ms).
Parameters
Parameter |
Input Type |
Description |
---|---|---|
milli |
Number |
The number of milliseconds to pause. |
Returns
Nothing.
Example
This example pauses the real-time client processing for 100 milliseconds.
Takes a screenshot, and saves it in the specified target directory with the filename as ScreenShot.png.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
path |
Text |
Name and location of the target directory. |
Returns
Nothing.
Example
This example takes the screen shot and saves it to the C:\Automation Studio directory.