Hallo,
ich habe folgendes Problem:
es gibt eine Liederliste. Hier muß ich nun alle Interpreten
herausfiltern. Der Interpret sollte aber in der neuen Liste
nur einmal erscheinen. (Also nur Interpreten, Bands...)
Beispiel:
Originalliste
ZitatDancing Queen;ABBA
Fernando;ABBA
Super Trouper;ABBA
All That She Wants;Ace Of Base
Aloha Heja He;Achim Reichel
Die neue Liste sollte nun so aussehen:
ZitatABBA
Ace of Base
Achim Reichel
Hier mal mein Code (ohne Duplicate...)
Spoiler anzeigen
$Liste = FileOpenDialog("Neue Liste", @ScriptDir, "Songliste (*.txt)")
$File = FileOpen($Liste, 0)
$file2 = FileOpen("Interpreten.txt", 1)
While True
$Line = FileReadLine($File)
If @error Then ExitLoop
$Interpret = StringSplit($Line, ";")
;MsgBox(0, "Lied", $Interpret[1])
;MsgBox(0, "Interpret", $Interpret[2])
FileWriteLine($file2, $Interpret[2]) ; hier müsste irgendwie überprüft werden ob der Interpret bereits existiert???
WEnd
FileClose($File)
FileClose($File2)
Hoffe Ihr habt da ne Idee.
Liebe Grüße
Ilse