PostKey
The function PostKey posts virtual-key codes to the currently displayed project screen. In other words, it simulates keyboard input.
Function | Group | Execution | Windows | Embedded | Thin Client | Mobile Access |
---|---|---|---|---|---|---|
PostKey | Module Activity | Synchronous | Supported | Supported | Supported | Not supported |
Syntax
PostKey(numKeydownOrKeyup,numwParam,numlParam)
- numKeydownOrKeyup
- A numerical flag with the following possible values:
Value Description 0 KeyDown event 1 KeyUp event In most cases, this value should be 0 to indicate that the key is being pressed.
- numwParam
- The virtual-key code to be posted, in hexadecimal format.
For a list of codes, go to: msdn.microsoft.com/library/dd375731.aspx
- numlParam
- Additional message information.
In most cases, this value should be 0 to indicate that there is no additional information.
Notes
If the option Enforce Web functionality equivalence is selected in the project settings, this function cannot be called from Global Procedures or Script worksheets. This is because the function is meaningful only when it is executed on stations that display project screens; it might cause unexpected behavior if it is called from background tasks that are executed on the project runtime server. For more information, see Preferences tab.
Returned value
This function does not return any value.
Examples
PostKey(0,0x24,0)