au3scr Posted March 8, 2008 Share Posted March 8, 2008 Only 1 window title appears here how to make them all appear in Edit? #include <GUIConstants.au3> $var = WinList() #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 633, 454, 193, 115) ;~ $List1 = GUICtrlCreateListView("windows ", 10, 10, 600, 400) For $i = 1 to $var[0][0] If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then $list2 = GUICtrlCreateEdit ($var[$i][0] &@CRLF,10,10,200,300) GUISetState(@SW_SHOW) EndIf Next #EndRegion ### END Koda GUI section ### Func IsVisible($handle) If BitAnd( WinGetState($handle), 2 ) Then Return 1 Else Return 0 EndIf EndFunc While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $list2 WinActivate($list2) EndSwitch WEnd Link to comment Share on other sites More sharing options...
Paulie Posted March 8, 2008 Share Posted March 8, 2008 #include <GUIConstants.au3> $var = WinList() #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 633, 454, 193, 115) ;~ $List1 = GUICtrlCreateListView("windows ", 10, 10, 600, 400) Dim $String = "" For $i = 1 to $var[0][0] If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then $String &= $var[$i][0] &@CRLF EndIf Next $list2 = GUICtrlCreateEdit($String, 10,10,200,300) GUISetState(@SW_Show) #EndRegion ### END Koda GUI section ### Func IsVisible($handle) If BitAnd( WinGetState($handle), 2 ) Then Return 1 Else Return 0 EndIf EndFunc While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $list2 WinActivate($list2) EndSwitch WEnd Link to comment Share on other sites More sharing options...
au3scr Posted March 8, 2008 Author Share Posted March 8, 2008 Thanks I think you have idea what i want and why i asked different methods to display windows, but now lests return to listview how make actin for list manu? Like when i click on listviewitem , it minimizes / restore window. Or I select window and then press button and then it does action. Link to comment Share on other sites More sharing options...
Paulie Posted March 8, 2008 Share Posted March 8, 2008 Maybe this will get you started: expandcollapse popup#include <GUIConstants.au3> #include <GUIListview.au3> Opt("GuiOnEventMode",1) $GUI = GUICreate("Window Manager", 633, 450, 150, 115) GUISetOnEvent($GUI_EVENT_CLOSE, "Quit") $List1 = _GUICtrlListView_Create ($GUI, "Windows", 10, 10, 600, 350, BitOR($LVS_REPORT, $LVS_SINGLESEL, $LVS_SHOWSELALWAYS),$LVS_EX_GRIDLINES) $Refresh = GUICtrlCreateButton("Refresh", 10, 380, 100,30) GUICtrlSetOnEvent(-1, "RefreshList") GUISetState(@SW_Show) RefreshList() While 1 Sleep(100) WEnd Func Quit() Exit EndFunc Func IsVisible($handle) If BitAnd( WinGetState($handle), 2 ) Then Return 1 Else Return 0 EndIf EndFunc Func RefreshList() _GUICtrlListView_DeleteAllItems($List1) $WinList = WinList() Dim $Item[2],$a=0 For $i = 1 to $WinList[0][0] If $WinList[$i][0] <> "" AND IsVisible($WinList[$i][1]) Then $a+=1 ReDim $Item[Ubound($Item)+1] $Item[$a]=_GUICtrlListView_AddItem($List1, $WinList[$i][0]) EndIf Next $Item[0]=$a _GUICtrlListView_SetColumnWidth ($List1,0, $LVSCW_AUTOSIZE) EndFunc 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