Also meine Schleife läuft durch nur mein listview item zeigt nur manche strings an
C
#include <GUIConstantsEx.au3>
#include <Array.au3>
#include <File.au3>
$file = @ScriptDir & "\Hallo.txt"
MsgBox(0,"", _FileCountLines($file))
$text = _Dateilesen($file)
_ArrayDisplay($text)
Opt("GUIOnEventMode", 1)
GuiCreate("Das ist meine erste Gui", 600, 600)
$Button1 = GUICtrlCreateButton("lol", 30, 30)
GUICtrlSetOnEvent($Button1, "_msg")
$Exit = GUICtrlCreateButton("Ende", 60, 30)
GUICtrlSetOnEvent($Exit, "close")
GUISetOnEvent($GUI_EVENT_CLOSE, "close")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "minimize")
$input = GUICtrlCreateInput("", 120, 30)
$msg = GUIGetMsg()
$array = WinList()
$list = GUICtrlCreateList("", 250, 60, 100, 300)
For $i=1 to Ubound($text) -1 Step +1
msgBox(0,"", $text[$i])
GUICtrlSetData($list, $text[$i])
Next
GUISetState(@SW_SHOW)
While 1
sleep(20)
WEnd
Func _Dateilesen($path)
Local $dateien[1]= ["0"]
Local $icheck = 0
For $j = 1 to _FileCountLines($file) Step +1
If $icheck = 0 Then
$dateien[0] = FileReadLine($path, $j)
$icheck = 1
Else
_ArrayAdd($dateien, FileReadLine($path, $j))
EndIf
Next
Return $dateien
EndFunc
Func IsVisible($handle)
If BitAND(WinGetState($handle), 2) Then
Return 1
Else
Return 0
EndIf
EndFunc
Func _msg()
MsgBox(0, "haha", "Funktioniert")
EndFunc
Func close()
Exit
EndFunc
Alles anzeigen