Specifications
Event Actions
Windows KeyPress Event Action
The Windows KeyPress event action indicates that the user pressed a key (of
the keyboard) within the context of an application window.
KeyPress events support the following parameters:
(BT Studio displays these values in the events pane.)
ExecutableName. The name of the process
Class. The class of the affected window
Title. The title of the affected window
ObjectID. Application-wide unique identifier of the affected window
Key. The decimal ASCII numeric value representing the key that was
pressed.
For letter, number, and punctuation keys, the reported key value is 0 (zero),
indicating that a KeyPress event occurred but not giving the specific key value
(for security reasons). You can, however, specify key values for other control
characters, such as Ctrl, Alt, Tab, Enter, Delete, F1, Alt+4, and so on. For a
list of decimal ASCII codes for non-printing characters, refer to
www.asciitable.com.
Note: Due to limitations of the Windows operating system, BT Studio and
Application Response cannot recognize the key sequences Ctrl+Alt+Delete and
Ctrl+C. To be able to recognize individual keystrokes (generally used to
monitor text-based applications), you must install the keystroke version of the
AR agent.
Example
transaction "F1help"
module "F1help"
{
# User presses "F1" key for help in Outlook
#
event "Help1" Windows KeyPress { ExecutableName="OUTLOOK" Key=112 }
event "Help2" Process Start { ExecutableName="msohelp" }
event "Help3" Windows Start { ExecutableName="msohelp" }
event "Help4" Windows MenuCommand { ExecutableName="OUTLOOK" Item="21858"}
event "Help5" Windows Create { ExecutableName="msohelp" }
}
Windows LoseFocus Event Action
The Windows LoseFocus event action indicates that an application window lost
focus. A window can lose focus when a pop-up window appears or when the
user selects another window.
158 BTStudio Administration Guide