Fehlersuche der Syntax Checker gibt folgtende fehler aus.
Ich Kenzeichne die Fehlersteellen mit "------>" am anfang.
Spoiler anzeigen
>C:\Programme\AutoIt3\SciTE\..\au3check.exe "E:\Geändert\(Ver.1.1)SkriptSetup.au3"
AutoIt3 Syntax Checker v1.54.8 Copyright (c) Tylo 2007
E:\Geändert\(Ver.1.1)SkriptSetup.au3(1267,16) : ERROR: syntax error
For $i <=
~~~~~~~^
E:\Geändert\(Ver.1.1)SkriptSetup.au3(1308,9) : ERROR: missing Wend.
Next
^
E:\Geändert\(Ver.1.1)SkriptSetup.au3(1262,35) : REF: missing Wend.
If ( $retvalSol = -1 ) then
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Geändert\(Ver.1.1)SkriptSetup.au3(1308,9) : ERROR: missing EndIf.
Next
^
E:\Geändert\(Ver.1.1)SkriptSetup.au3(1257,35) : REF: missing EndIf.
If ( $resultSol <> 0 ) Then
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Geändert\(Ver.1.1)SkriptSetup.au3(1308,9) : ERROR: missing EndIf.
Next
^
E:\Geändert\(Ver.1.1)SkriptSetup.au3(1231,6) : REF: missing EndIf.
While
^
E:\Geändert\(Ver.1.1)SkriptSetup.au3(1308,9) : ERROR: missing EndSwitch.
Next
^
E:\Geändert\(Ver.1.1)SkriptSetup.au3(1218,30) : REF: missing EndSwitch.
If ($CheckAlfe <> 1) Then
~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Geändert\(Ver.1.1)SkriptSetup.au3(1308,9) : ERROR: missing Wend.
Next
^
E:\Geändert\(Ver.1.1)SkriptSetup.au3(1214,40) : REF: missing Wend.
If StringLen($TypedesDings) < 3 Then
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\Geändert\(Ver.1.1)SkriptSetup.au3(1308,9) : ERROR: syntax error
Next
^
E:\Geändert\(Ver.1.1)SkriptSetup.au3 - 7 error(s), 0 warning(s)
>Exit code: 2 Time: 0.220
doch funktioniert die Funktion irgendwie.
Funktion
Spoiler anzeigen
Case $Button4So
$NamedesDings = GuiCtrlRead($Input1So )
$TypedesDings = GuiCtrlRead($Input2So )
StringRegExpReplace($Input2So, '\w', '')
Dim $wahr = 2 ;einen wehrt der weder 1 noch 0 verwirklicht aber benötigt wird
------> If StringLen($TypedesDings) < 3 Then
MsgBox(16, "Warnung", "Es wurden kein Type mit 3 Zeichen eingetragen!", 10)
Else
$CheckAlfe = StringIsAlpha ( $TypedesDings )
------> If ($CheckAlfe <> 1) Then
MsgBox(16, "Warnung", "Der Type ist unbekannt, verwenden sie A - Z !", 10)
Else
$Typ = GuiCtrlRead($Input2So )
$TypG = StringUpper ( $Typ )
$FindSol = FileOpen (@ScriptDir & "\Find.txt", 0 )
If ($FindSol = -1) Then
MsgBox(0, "Error", "Kann Datei nicht Öffnen!")
Exit
EndIf
Dim $wahr = 0
$AllLines1Sol = ""
While 1
$Neuerstring = FileReadLine($FindSol)
If @error = -1 Then
If ($wahr = 0) Then
MsgBox(16, "Warnung", "Dave, das kann ich nicht tun! Type existiert nicht.", 10)
Else
$Info = FileOpen (@ScriptDir & "\Infoanlagen.txt", 1 )
If ($Info = -1) Then
MsgBox(0, "Error", "Kann Datei nicht Öffnen!")
Exit
Else
Dim $ErsatzSol = ""
FileWrite($Info, @CRLF & "GELÖSCHT WURDE=" & $NamedesDings & " _" & $TypG & " aus " & $ErsatzSol )
FileClose($Info)
msgbox(0, "INFO", "Typ wurde gelöscht!" )
FileClose($FindSol)
EndIf
EndIf
StringTrimRight($AllLines1Sol, 1)
ExitLoop
EndIf
$Posu = StringInStr ( $Neuerstring , "_" )
Dim $Posy = $Posu - 3
$line1Sol = StringMid ( $Neuerstring, $Posy )
$resultSol = StringInStr ( $line1Sol, $TypG )
;msgbox(0, "ERROR", $resultSol )
------> If ( $resultSol <> 0 ) Then
Dim $wahr = 1
Dim $TempTypG = $TypG
$ErsatzSol = StringReplace ( $line1Sol , $TempTypG , " " )
$retvalSol = _ReplaceStringInFile($string6 , $line1Sol, $ErsatzSol )
------> If ( $retvalSol = -1 ) then
msgbox(0, "ERROR", "Es konnte nicht ersetzt werden in File: " & $string6 & " Error: " & @error)
exit
Else
Dim $i = 0
------> For $i <= 1 to 4 Step 1
Dim $NeueZeile = ""
;msgbox(0, "INFO", "Jetzt sieht der String so aus=$ErsatzSol: " & $ErsatzSol )
$resultSol2 = StringInStr ( $ErsatzSol, "_ _" )
If ( $resultSol2 <> 0 ) Then
$ErsatzSol2 = StringReplace ( $ErsatzSol , "_ _" , "_" )
$retvalSol2 = _ReplaceStringInFile($string6 , $ErsatzSol , $ErsatzSol2 )
If ( $retvalSol2 = -1 ) then
msgbox(0, "ERROR", "Es konnte nicht ersetzt werden in File: " & $string6 & " Error: " & @error)
exit
Else
;~ msgbox(0, "INFO", "2. Veränderung= " & $ErsatzSol2 )
Dim $ErsatzSol = $ErsatzSol2
EndIf
EndIf
$resultSol3 = StringInStr ( $ErsatzSol, " _" )
If ( $resultSol3 <> 0 ) Then
$ErsatzSol3 = StringReplace ( $ErsatzSol , " _" , "" )
$retvalSol3 = _ReplaceStringInFile($string6 , $ErsatzSol , $ErsatzSol3 )
If ( $retvalSol3 = -1 ) then
msgbox(0, "ERROR", "Es konnte nicht ersetzt werden in File: " & $string6 & " Error: " & @error)
exit
Else
;~ msgbox(0, "INFO", "3. Veränderung= " & $ErsatzSol3 )
Dim $ErsatzSol = $ErsatzSol3
EndIf
EndIf
$resultSol4 = StringInStr ( $ErsatzSol, "_ " )
;~ msgbox(0, "INFO", "Finde:" & $resultSol4 )
If ( $resultSol4 <> 0 ) Then
$ErsatzSol4 = StringReplace ( $ErsatzSol , "_ " , "" )
$retvalSol4 = _ReplaceStringInFile($string6 , $ErsatzSol , $ErsatzSol4 )
If ( $retvalSol4 = -1 ) then
msgbox(0, "ERROR", "Es konnte nicht ersetzt werden in File: " & $string6 & " Error: " & @error)
exit
Else
;~ msgbox(0, "INFO", "4. Veränderung= " & $ErsatzSol4 )
Dim $ErsatzSol = $ErsatzSol4
EndIf
EndIf
;~ msgbox(0, "INFO", $i )
------> Next
EndIf
EndIf
WEnd
EndIf
EndIf