Help and Questions about RegisterWindowMessage Topic is solved

Get help for the alpha version of AutoHotkey v2 here. Please state the v2 version you are working with in the title when making a new topic.
Posts: 14
Joined: 08 Mar 2019, 00:36

Help and Questions about RegisterWindowMessage

12 Jul 2020, 00:03

I'm playing around with SKAN's RegisterWindowMessage Shellhook.

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)) {

    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
Last edited by BoBo on 12 Jul 2020, 00:58, edited 1 time in total.
Reason: Moved to 'Ask for Help' v2.
Posts: 4140
Joined: 11 Jan 2017, 17:59

Re: Help and Questions about RegisterWindowMessage  Topic is solved

12 Jul 2020, 00:49

the onmessage documentation explains it

Return to “AutoHotkey v2 Help”

Who is online

Users browsing this forum: No registered users and 4 guests