Hello! Thanks for answer, but i want like that in Edit1: -------------------------
Info: Name is: Michael XYZ, 21 years old, Boston city, Name is: Olex Marshal, 17 years old, Boston city,Name is: Alex XYZ, 19 years old, Boston city,
-------------------------
Now i have only the last data from last input, also without "Info:". I want to load all.
In txt i have:Michael XYZ, 21, Boston
Olex Marshal, 17, Boston
Alex XYZ, 19, Boston
Now after click Get Data in Edit1 i have:
------------------------------ Name is: Michael XYZ, 21 years old, Boston city
-------------------------------
Code:
#include <Array.au3>
#include <File.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Example()
Func Example()
Local $sGetData
Local $sFilename = @ScriptDir & "\test.txt"
Local $aFilename, $x = 10, $y = 10
_FileReadToArray($sFilename, $aFilename, 0, ",")
If @error Then Exit MsgBox(4096, "File Read Error", "Unable to read file into an Array")
If UBound($aFilename, 2) <= 1 Then Exit MsgBox(4096, "File Read Error", "File cannot be stored in 2d Array")
Local $aControl = $aFilename
GUICreate("", 330, 10 + (30 * UBound($aFilename) - 1) + 100)
$iStart = GUICtrlCreateDummy()
For $i = 0 To UBound($aFilename) - 1
For $j = 0 To UBound($aFilename, 2) - 1
$aControl[$i][$j] = GUICtrlCreateInput($aFilename[$i][$j], $x, $y, 100, 20)
$x += 105
Next
$x = 10
$y += 30
Next
Local $idData = GUICtrlCreateButton("Get Data", 220, $y, 100, 30)
Local $ed = GUICtrlCreateEdit("", 20, $y+35, 300, 60)
;250 SZEROKOŚĆ
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $idData
For $i = 0 To UBound($aControl) - 1
Global $Edit1 = GUICtrlSetData(-1,"Info:"&@CRLF)
Global $Edit1 = GUICtrlSetData(-1,'Name is: '&GUICtrlRead($aControl[$i][0])&', '&GUICtrlRead($aControl[$i][1])&' years old, '&GUICtrlRead($aControl[$i][2])&' city')
Next
EndSwitch
WEnd
EndFunc
Please help.