Jump to content
Sign in to follow this  
IanN1990

Unflash a Window ?

Recommended Posts

IanN1990

I have been trying to get this sorted for 2 days now and still am not happy with the progress :)

I am working on a chat suppression script, similar to what skype uses when your set to DnD, so when its set to busy all messages are suppressed.

Now the basic idea is quite easy.

#NoTrayIcon
#include 'winapi.au3'
$SystemGUI=GUICreate('',1920,40,0,0,-2147483648,168)
$SystemHook = DllCall('user32.dll', 'int', 'RegisterWindowMessageW', 'wstr', 'SHELLHOOK') ;$SystemHook
GUIRegisterMsg($SystemHook[0], 'SystemDetectHook')
DllCall('user32.dll', 'int', 'RegisterShellHookWindow', 'hwnd', $SystemGUI)

While 1
Sleep(86400000)
WEnd

Func SystemDetectHook($hWnd,$Msg,$wParam,$lParam)
If $wParam = 32774 then
$lParam = WinGetTitle($lParam)
If _WinAPI_GetClassName($lParam) = "TConversationForm" Then
ConsoleWrite("Skype Message" & @crlf)
Else
ConsoleWrite("Steam Message" & @crlf)
WinSetState($lParam, '', @SW_HIDE)
EndIf
EndIf
EndFunc

but it seams steam keeps sending the "flash message", does anyone know a way to stop steam sending the "flash message" or perhaps send a message 2 the steam window it say "hey its been actived stop flashin me now" or something ^^

WinSetState($lParam, '', @SW_SHOWNORMAL)

WinSetState($lParam, '', @SW_MINIMIZE)

WinSetState($lParam, '', @SW_HIDE)

Kinda works, though the window "flashes" each time a message comes, sometimes fails, and sometimes steals "focus" from the current application :(

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  

×