(https://autohotkey.com/board/topic/80644-how-to-hook-on-to-shell-to-receive-its-messages/)
From what I understand the ShellMessage function should only be receiving 2 parameters (wParam and lParam). However, when I use it it's receiving 4.
(Example values)
param3 = 49192
param4 = 12327652
Param3 seems to remain the same (though I haven't rebooted to see if it changes.)
Param4 changes with each run of the script.
What are these 2 extra parameters and how can I go about figuring out the meaning of their values?
Code: Select all
myGui := Gui.New("+LastFound")
hWnd := WinExist()
DllCall("RegisterShellHookWindow", "UInt", Hwnd)
MsgNum := DllCall("RegisterWindowMessage", "Str","SHELLHOOK")
OnMessage(MsgNum, "ShellMessage")
ShellMessage(wParam, lParam, param3, param4)
{
if (!lParam || !WinExist("ahk_id" lParam)) {
Return
}
winT := WinGetTitle("ahk_id " lParam)
If (wParam=4 || wParam=32772) {
ToolTip "winT : " winT "`n[1] lParam: " lParam "`n[2] wParam: " wParam
. "`n[3] param3: " param3 "`n[4] param4: " param4
}
}