caleb41610 Posted September 28, 2012 Share Posted September 28, 2012 (edited) $serverlist = GUICtrlCreateListView( "#|User Name|IP Address|Operating System|Office version|Administrator|In AD", 255, 5, 535, 370 ) $test1 = GUICtrlCreateListViewItem( "1|PC-1|192.168.0.2|Windows 7|2003|Yes|No", $serverlist ) $test2 = GUICtrlCreateListViewItem( "2|PC-2|192.168.0.3|Windows XP|2003|No|Yes", $serverlist ) $button = GUICtrlCreateButton( "test", 5, 5, 50, 50 ) While 1 $msg = GUIGetMsg( ) Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $button makearray( $selected ) EndSelect WEnd Func makearray( $selected ) ; ?? EndFunc How would I parse the selected one in to an array like this? $array[1][1] = "1" $array[1][2] = "Caleb" etc. I'm going to make a script to keep 23 office computers in line and tell me which ones need updating. I have most of the rest finished but for some reason this part has me stuck. I wrote an example snipped above . Edited September 28, 2012 by caleb41610 Multi-Connection TCP Server Link to comment Share on other sites More sharing options...
hannes08 Posted September 28, 2012 Share Posted September 28, 2012 Take a look at the helpfile for the GUICtrlCreateListViewItem() function. The example states that somthing similar to this: GUICtrlRead(GUICtrlRead($listview)) will return the contents of the actual selected item. Use StringSplit() to get the line into an array. Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
FireFox Posted September 28, 2012 Share Posted September 28, 2012 Hi,How would I parse the selected one in to an arrayTake a look at _GUICtrlListView_ functions, especially _GUICtrlListView_GetItemText.Br, FireFox. Link to comment Share on other sites More sharing options...
caleb41610 Posted September 28, 2012 Author Share Posted September 28, 2012 Thanks guys I got it figured out. Multi-Connection TCP Server 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