ich bin momentan dabei n AutoIt script zu erstellen.
In diesem Script muss etwas aus einer txt datei ausgelesen werden.
(kann auch varriereren)
Jetzt habe ich 2 Probleme:
1. Es sollen die Angaben immer Zeielweise ausgelsesen werden.
Also als erstes das was in der ersten Zeile steht, damit dann was machen,
dann die nächste Zeile.
Bei einer TXT Datei funktioniert die Formatierung bei mir nicht, d.h. sie spring immer zurück, und alles wird in die erste Zeile geschrieben
(Weil ich sie immer runterladen will)
2.
Wie bekomme ich es hin dass die Zeilen nacheindander ausgelesen werden?
(so wie oben beschrieben)
das momentane Script sieht so aus:
Code:
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <GUIConstants.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <GUIListBox.au3>
#include <GuiEdit.au3>
#include <IE.au3>
#Include <File.au3>
$ip = "patch.gameroffantasy.de"
$FILE = @TempDir & "/patchlist.ini"
FileRead($FILE)
$lines = _FileCountLines( $FILE )
If $lines = 0 Then
MsgBox(48,"Fehler",$lines)
EndIf
$datei = FileReadLine($FILE,$lines)
$hWindow = GUICreate("World of Cerberus patcher", 402, 42)
$pProgress = GUICtrlCreateProgress(8, 8, 377, 25)
$pLabel_Fortschritt = GUICtrlCreateLabel("0 %", 192, 16, 36, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUISetState(@SW_SHOW)
_Dl("http://"&$IP&"/pack/"&$datei)
Func _Dl($sFunc_URL = "")
Local $hDownload = InetGet($sFunc_URL, @ScriptDir & "\" & $datei , 1, 1)
$hDateiGroese = InetGetSize($sFunc_URL)
Do
Sleep(100)
GUICtrlSetData($pProgress,(InetGetInfo($hDownload, 0)/$hDateiGroese)*100)
GUICtrlSetData($pLabel_Fortschritt,Round((InetGetInfo($hDownload, 0)/$hDateiGroese)*100,1) & " %")
Until InetGetInfo($hDownload, 2)
MsgBox(1,"","Download abgeschlossen!")
GUICtrlSetData($pLabel_Fortschritt,"100 %")
InetClose($hDownload)
exit
endfunc
Thx im Vorraus
LG
Henpi
ps: habe es jetzt mal mit ner Ini ausprobiert, die Formatierung (Zeilenumbrüche) sind jetzt immer da, nur das Zählen der Zeilen und das runterladen der einzelnen Dateien funktioniert auch nicht, weil ads auslesen der Ini nicht richtig abläuft







