m1ch43l Posted July 27, 2008 Posted July 27, 2008 hi all member n master i'm newbie and this is my first script #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 141, 280, 187, 122) GUISetOnEvent($GUI_EVENT_CLOSE,"Form1Close") $List1 = GUICtrlCreateList("", 8, 8, 121, 188) GUICtrlCreateInput("", 8, 208, 121, 21) $Button1 = GUICtrlCreateButton("Button1", 32, 240, 75, 25, 0) GUICtrlSetOnEvent(-1, "Button1") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func Form1Close() Exit EndFunc Func Button1() $file = FileOpen("C:\test.txt",0) $List1 = FileRead($file) GUICtrlSetData(3,$List1) EndFunc and this the question are 1. how to appear name with vertical in $list1 for example in c:\test.txt-> apple banana grape orange but in $list1 when i click button1,the result is like this applebananagrapeorange 2. if i double click in $list1 box,how to send to input box automaticly appear? thanx.. have a nice day all
Minikori Posted July 27, 2008 Posted July 27, 2008 hi all member n masteri'm newbie and this is my first script#include <GUIConstants.au3>Opt("GUIOnEventMode", 1)#Region ### START Koda GUI section ### Form=$Form1 = GUICreate("Form1", 141, 280, 187, 122)GUISetOnEvent($GUI_EVENT_CLOSE,"Form1Close")$List1 = GUICtrlCreateList("", 8, 8, 121, 188)GUICtrlCreateInput("", 8, 208, 121, 21)$Button1 = GUICtrlCreateButton("Button1", 32, 240, 75, 25, 0)GUICtrlSetOnEvent(-1, "Button1")GUISetState(@SW_SHOW)#EndRegion ### END Koda GUI section ###While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitchWEndFunc Form1Close() ExitEndFunc Func Button1() $file = FileOpen("C:\test.txt",0) $List1 = FileRead($file) GUICtrlSetData(3,$List1)EndFuncand this the question are1. how to appear name with vertical in $list1 for example in c:\test.txt-> apple banana grape orange but in $list1 when i click button1,the result is like this applebananagrapeorange 2. if i double click in $list1 box,how to send to input box automaticly appear?thanx..have a nice day allSave your text file as apple|banana|grape|orange or do a stringreplace: @CRLF to "|" before changing data and after opening file (Make sure @CRLF has no quotes). For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com
m1ch43l Posted July 29, 2008 Author Posted July 29, 2008 Save your text file as apple|banana|grape|orange or do a stringreplace: @CRLF to "|" before changing data and after opening file (Make sure @CRLF has no quotes).thank a lot minikori.. finally i can do it:)but the question number 2,i cannt do it:( please somebody help me,thanx..
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