Hallo zusammen,
habe hier ein kleines Tool um in einige meiner Datas noch eine Zeile und einen Eintrag oben einzufügen.
Wenn ich es nun starten will kommt ein Fehler, welchen ich selber irgendwie nicht raus bekomme.
Code:
Spoiler anzeigen
#include <File.au3>
$List = _FileListToArray("E:\Datas ohne ID", "*", 1)
For $i = 1 To $List [0]
$hFile = FileOpen("E:\Datas ohne ID" & $List[$i], 0)
$Read = FileRead($hFile)
FileClose($hFile)
$hFile = FileOpen("E:\Datas mit ID" & $List[$i], 2)
$tmpsplit = StringSplit($Read, @CRLF)
$Counter = 1
For $k = 1 To $tmpsplit[0]
If $tmpsplit[$k] = "" Then ContinueLoop
If StringRight($tmpsplit[$k], 2) = ",*" Then
$tmpsplit[$k] = StringTrimRight($tmpsplit[$k], 1)&"ID,*"
EndIf
If $tmpsplit[$k] = "*" Then
$tmpsplit[$k] = StringFormat("%05d", $Counter) & @CRLF & "*"
$Counter += 1
EndIf
FileWrite($hFile, $tmpsplit[$k]&@CRLF)
Next
FileClose($hFile)
Next
Fehler:
Spoiler anzeigen
>"O:\AutoIt\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "G:\Datas mit ID\Id einfügen.au3" /UserParams
+>11:32:05 Starting AutoIt3Wrapper v.2.1.2.9 Environment(Language:0407 Keyboard:00000407 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64)
>Running AU3Check (1.54.22.0) from:O:\AutoIt\AutoIt3
+>11:32:06 AU3Check ended.rc:0
>Running:(3.3.8.1):O:\AutoIt\AutoIt3\autoit3_x64.exe "G:\Datas mit ID\Id einfügen.au3"
--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
G:\Datas mit ID\Id einfügen.au3 (10) : ==> Subscript used with non-Array variable.:
For $i = 1 To $List [0]
For $i = 1 To $List ^ ERROR
->11:32:06 AutoIt3.exe ended.rc:1
>Exit code: 1 Time: 0.915
Könnte bitte wer drüber sehen und wenn möglich mir den Fehler benennen / beheben Danke.
Mfg Ghostleader