Sign in to follow this  
Followers 0
layer

hWnd Panel

2 posts in this topic

Hey guys! :evil: 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

Share this post


Link to post
Share on other sites



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.

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  
Followers 0