buzz44 Posted January 23, 2005 Share Posted January 23, 2005 hello all i need help ... this script gets a list of all the windows at puts them in a list .. its all good... if u close a window and click update it updates the list.. and its all good .. the problem is if i close a window click update then reopen the window again and click update it doesnt come up ???? am i doing sumting wrong ? thanks expandcollapse popup#include <GUIConstants.au3> GUICreate("My GUI Button") ; will create a dialog box that when displayed is centered Opt("GUICoordMode",2) $update = GUICtrlCreateButton ("Update", 10, 30, 50) $windowlist =GUICtrlCreateList ("", 30,50,121,97) GUISetState () ; will display an dialog box with 2 button $list = WinList() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $update GetWindows() EndSelect Wend Func GetWindows() GUICtrlSetData ($windowlist, "") For $i = 1 to $list[0][0] If $list[$i][0] <> "" AND IsVisible($list[$i][1]) Then GUICtrlSetData ($windowlist, $list[$i][0] & "|") EndIf Next EndFunc Func IsVisible($handle) If BitAnd( WinGetState($handle), 2 ) Then Return 1 Else Return 0 EndIf EndFunc qq Link to comment Share on other sites More sharing options...
buzz44 Posted January 25, 2005 Author Share Posted January 25, 2005 anyone ??????? qq Link to comment Share on other sites More sharing options...
Valik Posted January 25, 2005 Share Posted January 25, 2005 It would be extremely helpful if you actually called WinList() again so that you have fresh data instead of the old, stale data. Link to comment Share on other sites More sharing options...
buzz44 Posted January 25, 2005 Author Share Posted January 25, 2005 omg im such as idiot... THANKYOU qq 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