I tried adapting the following example from the documentation.
I'm new to OnMessage, but I've read all the help files and can't see the problem.
Could someone please point out what I'm missing?
Thanks much.
Code:
;Example from documentation
OnMessage(0x5555, "MsgMonitor")
OnMessage(0x5556, "MsgMonitor")
MsgMonitor(wParam, lParam, msg)
{
; Since returning quickly is often important, it is better to use a ToolTip than
; something like MsgBox that would prevent the function from finishing:
ToolTip Message %msg% arrived:`nWPARAM: %wParam%`nLPARAM: %lParam%
}
Code:
;My attempt to adapt the above examlpe to monitor mouse movement (WM_MOUSEMOVE = 0x200)
OnMessage(0x200, "MsgMonitor")
MsgMonitor(wParam, lParam, msg)
{
ToolTip Message %msg% arrived:`nWPARAM: %wParam%`nLPARAM: %lParam%
}
Edit: I also tried this, which didn't work either
Code:
OnMessage(0x200, "WM_MOUSEMOVE")
return
WM_MOUSEMOVE(wParam, lParam, msg)
{
ToolTip Message %msg% arrived:`nWPARAM: %wParam%`nLPARAM: %lParam%
}
EDIT_2: I'm pretty sure I'm doing something very fundamentally wrong because I have just tried the following without success.
Code:
OnMessage(0x21, "WM_MOUSEMOVE")
OnMessage(0xA0, "WM_MOUSEMOVE")
OnMessage(0x200, "WM_MOUSEMOVE")
OnMessage(0x20A, "WM_MOUSEMOVE")
OnMessage(0x2A1, "WM_MOUSEMOVE")
OnMessage(0x2A2, "WM_MOUSEMOVE")
OnMessage(0x2A3, "WM_MOUSEMOVE")
return
WM_MOUSEMOVE(wParam, lParam, msg)
{
ToolTip Message %msg% arrived:`nWPARAM: %wParam%`nLPARAM: %lParam%
}