KilRoy Posted May 15, 2006 Share Posted May 15, 2006 (edited) I am trying to open multiple windows when I click on the list in a List View. Using the example in the Help file for GUICtrlCreateListView, I can select one click the value button and it creates the new window, but if I select the other and click the value button it waits until the other window is closed before it creates the new one. I have searched the forum for multiple windows to no avail. I have been getting to know AutoIT over the past few weeks with some great success, but this one eludes me. Thanks for any and all help. Kilroy Edited May 15, 2006 by KilRoy Link to comment Share on other sites More sharing options...
Xenobiologist Posted May 15, 2006 Share Posted May 15, 2006 HI, may you post your script? It might be easier to help you then. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
KilRoy Posted May 15, 2006 Author Share Posted May 15, 2006 (edited) HI, may you post your script? It might be easier to help you then. So long, Mega Here it is. It is a simplified version of the Help File example. #include <GUIConstants.au3> GUICreate("listview items",220,250, 100,200,-1) $listview = GUICtrlCreateListView ("Item",10,10,200,150) $button = GUICtrlCreateButton ("Value?",75,170,70,20) $item1=GUICtrlCreateListViewItem("item1",$listview) $item2=GUICtrlCreateListViewItem("item2",$listview) $item3=GUICtrlCreateListViewItem("item3",$listview) GUISetState() Do $msg = GUIGetMsg () Select Case $msg = $button MsgBox(0,"Selected Item",GUICtrlRead(GUICtrlRead($listview))) EndSelect Until $msg = $GUI_EVENT_CLOSE Edited May 15, 2006 by KilRoy Link to comment Share on other sites More sharing options...
Xenobiologist Posted May 15, 2006 Share Posted May 15, 2006 HI, #include <GUIConstants.au3> GUICreate("listview items", 220, 250, 100, 200, -1) $listview = GUICtrlCreateListView("Item", 10, 10, 200, 150) $button = GUICtrlCreateButton("Value?", 75, 170, 70, 20) $item1 = GUICtrlCreateListViewItem("item1", $listview) $item2 = GUICtrlCreateListViewItem("item2", $listview) $item3 = GUICtrlCreateListViewItem("item3", $listview) $label = GUICtrlCreateLabel("Value", 95, 210, 70, 18) GUISetState() GUISetState(@SW_SHOW) Do $msg = GUIGetMsg() Select Case $msg = $button GUICtrlSetData($label, GUICtrlRead(GUICtrlRead($listview))) EndSelect Until $msg = $GUI_EVENT_CLOSE So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
KilRoy Posted May 15, 2006 Author Share Posted May 15, 2006 Thanks for the quick reply, but it didn't create the windows. I understand what it did do, so thanks for teaching that point. Allow me to clarify what I'm trying to do. In the original, when you select "Item 1" and click the "Value?" button, it would open a window stating Item 1 was selected, which is good. But I want that child window to remain open and select "Item 2" and click the "Value?" button in the parent window and open another child window, which would end up with two child windows open at the same time. Is this possible? Thanks for taking the time to teach a stupid newbie! Link to comment Share on other sites More sharing options...
Xenobiologist Posted May 15, 2006 Share Posted May 15, 2006 HI, something like : #include <GUIConstants.au3> $gui = GUICreate("listview items",220,250, 100,200,-1) $listview = GUICtrlCreateListView ("Item",10,10,200,150) $button = GUICtrlCreateButton ("Value?",75,170,70,20) $item1=GUICtrlCreateListViewItem("item1",$listview) $item2=GUICtrlCreateListViewItem("item2",$listview) $item3=GUICtrlCreateListViewItem("item3",$listview) GUICtrlCreateInput(GUICtrlRead(GUICtrlRead($listview)), 100,210, 80, 20) GUISetState() Do $msg = GUIGetMsg () Select Case $msg = $button GUICreate(GUICtrlRead(GUICtrlRead($listview)), 200, 20, Random(10, Random(100, @DesktopHeight-100,1),1), Random(10, @DesktopHeight-100,1),-1,$WS_EX_MDICHILD,$gui) GUISetState(@SW_SHOW) EndSelect Until $msg = $GUI_EVENT_CLOSE So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
KilRoy Posted May 15, 2006 Author Share Posted May 15, 2006 That's it!! Thanks so much for helping. I assume I can add to it to allow closing one of the child windows without closing all of them by following the example in the child.au3 sample. Thanks again for the much needed help! Link to comment Share on other sites More sharing options...
Xenobiologist Posted May 15, 2006 Share Posted May 15, 2006 That's it!! Thanks so much for helping. I assume I can add to it to allow closing one of the child windows without closing all of them by following the example in the child.au3 sample.Thanks again for the much needed help!No prob! Go on! So long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times 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