Jump to content

Select List Event


Recommended Posts

Hello

i created a Gui With a List Box That Read The Data From A TXT File

So far so good But Now i am Looking for that when i Click at the List

it will Take the Data form the line and run for exmaple notepad and enter the

the data in the notepad file so i can stil manualy edit the file.

Regards

Krikov

#include <GUIConstants.au3>#include <file.au3>GUICreate("My GUI combo") GUICtrlCreateList("", 24, 50, 145, 100)$NoOfItems=_FileCountLines("c:\test.txt")Dim $ComboValues[$NoOfItems-1]_FileReadToArray("c:\test.txt", $ComboValues)For $LoopCtr = 1 to $ComboValues[0]-1  GUICtrlSetData(-1,StringStripCR($ComboValues[$LoopCtr]))NextGuiSetState()While 1  $msg = GuiGetMsg()  Select  Case $msg = $GUI_EVENT_CLOSE        ExitLoop    Case Else       ;;; EndSelectWEnd


            
        

        

        
            

    
        

        
            [topic="63488"][font="Arial"]Krikov Tray Quick Menu[/font][/topic]
        
    

        
    

    

    




    Link to comment
    
        
    
    
    

    
    Share on other sites
    

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    


    
    More sharing options...

    


    

                    
                    
                    
                

                    

                    
                    





    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


GaryFrost
            
            
                Posted 
                
            
        
    
    
        


GaryFrost
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Developers
                
                    
                
            
            
                
                    
                        
                            
                                
                            
                                 7.4k
                            
                                
                            
                        
                        
                    
                
            
            
                

    
    
        
RIP: I don't need your attitude. I have one of my own
    
    

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            Posted 
            
            
                
                
            
        
    

    

    

    
        
        
            #include <GUIConstants.au3>
#include <file.au3>


GUICreate("My GUI combo")

$list = GUICtrlCreateList("", 24, 50, 145, 100)
$NoOfItems = _FileCountLines("c:\test.txt")
Dim $ComboValues[$NoOfItems - 1]
_FileReadToArray("c:\test.txt", $ComboValues)
For $LoopCtr = 1 To $ComboValues[0] - 1
   GUICtrlSetData(-1, StringStripCR($ComboValues[$LoopCtr]))
Next

GUISetState()
While 1
   $msg = GUIGetMsg()
   Select
      Case $msg = $GUI_EVENT_CLOSE
         ExitLoop
        Case $msg = $list
            MsgBox(0,"test",GUICtrlRead($list))
      Case Else
        ;;;
   EndSelect
WEnd

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...