Hallo zusammen,
Ich habe mal ein Beispiel-Script geschrieben und ich verstehe eine Sache nicht: Warum kann AS den Inhalt einer Liste in einer Liste nicht vernünftig vergleichen, wie geht das unkompliziert besser bzw überhaupt?
Eigentlich dürfte "a2" nicht zweimal im Ergebnis auftauchen, und wenn ich keine Liste in einer Liste habe, sondern zB nur "2", dann funktioniert das if ... Is not in ... then auch gut.
Wer kann mir helfen bitte?
set tempList to {"1", {"a", "2"}, "3", "4", "5"}
set theList to {{"a", "2"}}
repeat with k from 1 to length of tempList
if item k of tempList is not in theList then
copy item k of tempList to the end of theList
end if
end repeat
set theText to ""
repeat with f from 1 to length of theList
set theText to theText & item f of theList & linefeed
end repeat
display dialog "" & theText
Ergebnis:
"a2
1
a2
3
4
5
"