Window.SendMessage
Description
- Sends a WinAPI SendMessage() call to each window matching the specified caption list.
Syntax
- Window.SendMessage(msg, wp, lp, han)
Parameters
- msg
- (mixed) the message to be sent
-
Possible Values
- wm_command
-
- wm_app
-
- wm_user
-
- wm_user+n
- where n is a number
- wp
- (integer) specifies additional message-specific information
- lp
- (integer) specifies additional message-specific information
- han
- (mixed) handle or class of the window(s) to act on
Return Value
- (mixed) depends on the message sent
Examples
- Window.SendMessage("wm_command", 40046, 0, "c=winamp v1.x")
- Window.SendMessage("wm_user", 1, 105, "c=winamp v1.x")
- Sets variable SendMessage to length of current track
Notes
- The WinAPI function, SendMessage, sends the specified message to the target window(s), calling the window procedure & waiting for it to process the message before returning.
- Precede parameter integer values with "0x" to indicate a hexadecimal number, for example:
- Note that Window.PostMessage() is generally safer to use than Window.SendMessage(), unless a return is needed from the message handler.
See Also