AppPostMessage is a built-in scripting function that sends a Windows system message to another application window.
Function | Group | Execution | Windows | Embedded | Thin Client |
---|---|---|---|---|---|
AppPostMessage | Module Activity | Synchronous | Supported | Supported | Supported |
This is an optional parameter. If no value is specified, then the default timeout is five seconds (or 5000 milliseconds).
Value | Description |
---|---|
0 | ERROR: The system message was not sent, or the specified application window did not respond, within the timeout period. |
1 | SUCCESS: The system message was successfully sent. |
AppPostMessage is similar to the function PostMessage in the Microsoft Windows API, and it allows many of the same options. For more information, including a list of available system messages, please refer to the Windows API documentation.
AppPostMessage( "Calculator", "CLOSE", 3, 1 )