#include <WinAPISysWin.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> Global $bHook = 1 ;GUI stuff: Global $hGui = GUICreate("", 1, 1, -100, -100) ;Notification timeout: Global $iTimeout = 1000 Global $iBlinkCount = 0 Global $iExpireCount = 0 ;ToolTip data Global $iTooltipIcon = 0 Global $iTooltipX = @DesktopWidth - 400 Global $iTooltipY = @DesktopHeight - 40 ;Hook stuff: GUIRegisterMsg(_WinAPI_RegisterWindowMessage("SHELLHOOK"), "HShellWndProc") ShellHookWindow($hGui, $bHook) ; Perform action on Func HShellWndProc($hWnd, $Msg, $wParam, $lParam) Switch $wParam Case $HSHELL_FLASH $iTooltipIcon = Mod($iTooltipIcon + 1, 2) + 1 $iBlinkCount = $iBlinkCount + 1 ToolTip(WinGetTitle($lParam), $iTooltipX, $iTooltipY, "Notification:", $iTooltipIcon, $TIP_FORCEVISIBLE) AdlibRegister(NotificationTimeout, $iTimeout) EndSwitch EndFunc Func NotificationTimeout() $iExpireCount = $iExpireCount + 1 If $iExpireCount == $iBlinkCount Then ToolTip("") AdlibUnRegister(NotificationTimeout) EndIf EndFunc Func ShellHookWindow($hWnd, $bFlag) Local $sFunc = 'DeregisterShellHookWindow' If $bFlag Then $sFunc = 'RegisterShellHookWindow' Local $aRet = DllCall('user32.dll', 'int', $sFunc, 'hwnd', $hWnd) ;MsgPrint($sFunc & ' = ' & $aRet[0]) Return $aRet[0] EndFunc While 1 Sleep(1000) WEnd