gleem Posted June 26, 2006 Posted June 26, 2006 (edited) I am creating a program that grabs data from what the user selects... However, I am having some trouble grabbing the data that is being selected. here is what I have so far. ; Generate GUI GUICREATE("Net View GUI",190,530) $netviewcopy = GuiCtrlCreateList("", 10, 10, 170, 500 ) GuiCtrlSetData($netviewcopy, "1|2|3|4|5|6|7", "") $copybtn = GuiCtrlCreateButton("Copy",10,500,80,20) $exitbtn = GuiCtrlCreateButton("Exit",100,500,80,20) ; GUI MESSAGE LOOP GuiSetState() While 1 $button = GuiGetMsg() If $button = $exitbtn Then Exit If $button = $copybtn Then Msgbox(0,"You Selected",$netviewcopy) Endif WEnd Edited June 26, 2006 by gleem
AutoItKing Posted June 26, 2006 Posted June 26, 2006 Try this: ; Generate GUI GUICREATE("Net View GUI",190,530) $netviewcopy = GuiCtrlCreateList("", 10, 10, 170, 500 ) GuiCtrlSetData($netviewcopy, "1|2|3|4|5|6|7", "") $copybtn = GuiCtrlCreateButton("Copy",10,500,80,20) $exitbtn = GuiCtrlCreateButton("Exit",100,500,80,20) ; GUI MESSAGE LOOP GuiSetState() While 1 $button = GuiGetMsg() If $button = $exitbtn Then Exit If $button = $copybtn Then Msgbox(0,"You Selected",GuiCtrlRead($netviewcopy)) Endif WEnd http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script]
gleem Posted June 26, 2006 Author Posted June 26, 2006 Try this: ; Generate GUI GUICREATE("Net View GUI",190,530) $netviewcopy = GuiCtrlCreateList("", 10, 10, 170, 500 ) GuiCtrlSetData($netviewcopy, "1|2|3|4|5|6|7", "") $copybtn = GuiCtrlCreateButton("Copy",10,500,80,20) $exitbtn = GuiCtrlCreateButton("Exit",100,500,80,20) ; GUI MESSAGE LOOP GuiSetState() While 1 $button = GuiGetMsg() If $button = $exitbtn Then Exit If $button = $copybtn Then Msgbox(0,"You Selected",GuiCtrlRead($netviewcopy)) Endif WEnd ahhh.. I see the error of my ways.. forgot the GuiCtrlRead... thanks so much
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