LuigiMario Posted August 23, 2007 Posted August 23, 2007 (edited) Is there an easy way to know that if new window has been opened (doesn't matter window name/hwnd) than getting the winlist and comparing with a previously stored winlist? I need this to make any window opened transparent. Q: Why don't you use a software to do this? There are tons of those exes! A: Because I would like to have many grafic functions into one exe, instead than 4 or 5 programs running to do small things. Any idea? :\ Edited August 23, 2007 by LuigiMario
James Posted August 23, 2007 Posted August 23, 2007 OK. Well, you need to create an array of all windows. Then keep comparing arrays. If something is different then msgbox with the difference. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
DjDeep00 Posted August 23, 2007 Posted August 23, 2007 Is there an easy way to know that if new window has been opened (doesn't matter window name/hwnd) than getting the winlist and comparing with a previously stored winlist? I need this to make any window opened transparent. Q: Why don't you use a software to do this? There are tons of those exes! A: Because I would like to have many grafic functions into one exe, instead than 4 or 5 programs running to do small things. Any idea? :\ Check this out....thanx to "cameronsdad" #include<array.au3> $thelist = WinList() $count = $thelist[0][0] While 1 $tmp = WinList() $newCount = $tmp[0][0] If $newCount > $count Then For $i = 1 to $newCount $found = 0 For $j = 1 to $count If $thelist[$j][0] = $tmp[$i][0] Then $found = 1 ExitLoop EndIf Next If Not $found Then MsgBox(0,"New Window",$tmp[$i][0] & @CRLF & "is a new window") ExitLoop EndIf Next $thelist = $tmp $count = $newCount EndIf If $newCount < $count Then $thelist = $tmp $count = $newCount EndIf Sleep(250) ConsoleWrite(@CRLF & $count & " :: " & $newCount & @CRLF) WEnd
LuigiMario Posted August 23, 2007 Author Posted August 23, 2007 Works perfectly, thanks a lot Thanks to JamesB too.
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