Jump to content
Sign in to follow this  

WM_SHELLHOOK on dot.Net pop-ups

Recommended Posts


I needed to catch pop-ups from RSS-reader, so I was testing WM_SHELLHOOK-based solution.  Sadly it do not work - (i cannot make it catch pop-ups) as aspected for some reason. Is there a way to detect those pop-ups?

pop-ups and main window have same class {WindowsForms10.Window.8.app.0.3dd72c2} only difference - pop-ups have blank title

only messages from RSS-Reader main window (0x00008004) reach to ConsoleWrite()...

>>>> Window <<<<
Class:  WindowsForms10.Window.8.app.0.3dd72c2
Position:   1654, 985
Size:   264, 95
Style:  0x16010000
ExStyle:    0x00010008
Handle: 0x000000000006035A

for now i have working AdlibRegister() - based solution, but i wanted to do it more clean way...

#include <WinAPI.au3>
#include <WinAPISys.au3>
#include <WindowsConstants.au3>

Global $hAutoItDummyGUI = GUICreate('AutoItDummyGUI', 0,0,0,0,-1,BitOR($WS_EX_TOOLWINDOW,$WS_EX_TRANSPARENT))
GUIRegisterMsg(_WinAPI_RegisterWindowMessage('SHELLHOOK'), 'WM_SHELLHOOK')

While 1

Func WM_SHELLHOOK($hWnd, $iMsg, $wParam, $lParam)
    #forceref $iMsg

    ConsoleWrite("Window : " & $lParam & "  message: {"& $wParam &"}  title: (" & WinGetTitle($lParam) & ")  class: ["&_WinAPI_GetClassName($lParam)&"]" & @CRLF)



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this