Iczer Posted July 22, 2016 Share Posted July 22, 2016 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 <<<< Title: 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)) GUISetState(@SW_SHOWMINNOACTIVE, $hAutoItDummyGUI) GUIRegisterMsg(_WinAPI_RegisterWindowMessage('SHELLHOOK'), 'WM_SHELLHOOK') _WinAPI_RegisterShellHookWindow($hAutoItDummyGUI) While 1 Sleep(8) WEnd Func WM_SHELLHOOK($hWnd, $iMsg, $wParam, $lParam) #forceref $iMsg ConsoleWrite("Window : " & $lParam & " message: {"& $wParam &"} title: (" & WinGetTitle($lParam) & ") class: ["&_WinAPI_GetClassName($lParam)&"]" & @CRLF) EndFunc Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now