layer Posted July 14, 2005 Share Posted July 14, 2005 Hey guys! Umm... It's not much, I just was messing aorund, going to bed now... But I never knew how many windows were open (well not open I guess, but how many windows there are even if not visible) until I ran this: $main = GUICreate("hWnd Panel", 315, 200) $list = GUICtrlCreateListView("Window Title | Window Handle", 5, 10, 300, 150) $wlist = WinList() For $i = 1 To $wlist[0][0] $listitem = GUICtrlCreateListViewItem($wlist[$i][0] & "|" & $wlist[$i][1], $list) Next GUISetState(@SW_SHOW, $main) AdlibEnable("_PopList", 5000) While 1 $get = GUIGetMsg() If $get = -3 Then Exit WEnd Func _PopList() GUICtrlDelete($listitem) $wlist = WinList() For $i = 1 To $wlist[0][0] $listitem = GUICtrlCreateListViewItem($wlist[$i][0] & "|" & $wlist[$i][1], $list) Next EndFunc ;==>_PopList Cheers! FootbaG Link to comment Share on other sites More sharing options...
therks Posted July 14, 2005 Share Posted July 14, 2005 Hmm... You set $listitem to multiple values, keeping it at the last value, then adlib to delete that every five seconds, and fill the list again... I'm pretty sure you're going to end up with duplicates. If you want to "refresh" the list every 5 seconds, then I suggest using Gary's GuiListView UDFs. He's got one in there called GuiCtrlListViewDeleteAll (or something similar) try calling that at the beginning of your adlib function. My AutoIt Stuff | My Github 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