Jump to content

WinList GuiList Update


buzz44
 Share

Recommended Posts

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

#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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...