Krikov Posted July 15, 2005 Posted July 15, 2005 Helloi created a Gui With a List Box That Read The Data From A TXT FileSo 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 thethe data in the notepad file so i can stil manualy edit the file.RegardsKrikovexpandcollapse popup#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] (adsbygoogle = window.adsbygoogle || []).push({}); GaryFrost Posted July 15, 2005 GaryFrost Developers 7.4k RIP: I don't need your attitude. I have one of my own Posted July 15, 2005 #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.
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