möchte folgendes erreichen, überprüfen ob die Nr in der Liste existiert dann die entsprechende stelle mit bestimmen sonst soll "Nicht vorhanden" geschrieben werden, doch Match ist immer True. Auch wenn die Nr in der Liste nicht existieren.
Code: Select all
NewEk=
(
1456 19,99
6541 18,50
98745 15,99
)
FormatTime, datum,, dd.M.yyyy
FileRead, list, ean.txt
Match := 0
Loop, Parse, NewEk, `n
{
if (A_Loopfield = "")
break
preisstrsplt := StrSplit(A_LoopField, "`t")
erstnr = % preisstrsplt[1]
zweitnr = % preisstrsplt[2]
Loop, Parse, list, `n
{
If InStr(A_Loopfield, erstnr)
{
newean := SubStr(A_LoopField, 9, 22)
newean := Trim(newean, "`r")
FileAppend, %newean%`t%zweitnr%`t%datum%`n, erg.txt
Match := 1
break
}
}
if (Match = 0)
{
FileAppend, "Nicht vorhande"`t%zweitnr%`t%datum%`n, erg.txt
}
}
ToolTip, Suche Beendet
sleep, 2500
Tooltip
ExitApp