Sign in to follow this  
Followers 0
gleem

Grabbing Data From List

3 posts in this topic

#1 ·  Posted (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 by gleem

Share this post


Link to post
Share on other sites



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]

Share this post


Link to post
Share on other sites

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

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