Syntax
PostWindowsMessage
Handle=<hwnd>
Message=<msgnum>
[WParam=<wparam>]
[LParam=<lparam>]Description
Post a Windows message.Parameters
Handle=<hwnd>
- Required. The handle of the window to which the message is to be sent. This is normally obtained from a WaitForWindow or SetWindow statement.
Message=<msgnum>
- Required. The numeric identifier of the message to send. For your own messages you should add an offset to the WmApp intrinsic variable to ensure that your message identifier does not conflict with a standard Windows message identifier.
WParam=<wparam>
- Optional. A numeric parameter to pass to the destination with the message. The default is zero.
LParam=<lparam>
- Optional. A numeric parameter to pass to the destination with the message. The default is zero.
Remarks
The PostWindowsMessage statement 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. See also SendWindowsMessage and WaitForWindowsMessageExample
WaitForWindow Caption="MessageReceiver" Result=hwnd
PostWindowsMessage
Handle=hwnd
Message=WmApp + 1
WParam=66
LParam=28The above script fragment posts a message to the window with the caption "MessageReceiver" and returns immediately.