Wie muß ich ihn umschreiben, damit jede Zeile als Einheit betrachtet wird und nicht noch bei Leerzeilen getrennt wird?
Code: Select all
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Liste := clipboard
Txt := RegExReplace(Liste,"[^ a-zA-ZöäüÖÄÜß#\-\/\\]"," "), Txt := RegExReplace(Liste,"(\n|\s)+"," ")
Txt := RegExReplace(Liste,"\r|^\s+|\s+$"), sRegEx := tRegEx := RegExReplace(Liste,"\s","`n",cnt)
Sort,sRegEx,U
Loop, Parse, sRegEx,`n
{
A_Current := A_LoopField, A_Count := 0
Loop,Parse,tRegEx,`n
if (A_Current = A_LoopField)
A_Count++
_%A_Count% .= ((StrLen(_%A_Count%)>0) ? ", " : "") A_Current, o .= ((A_Index>1) ? "`n" : "") A_Count
}
Sort,o,NUR
Loop,Parse,o,`n
out .= ((A_Index>1) ? "`n" : "") A_LoopField " mal:`t" _%A_LoopField%
FormatTime, CurrentDateTime,, dd.MM.yyyy--HH-mm-ss
FileAppend,%out%,Analyse %CurrentDateTime%.txt
msgbox Fertig