| |
|
|
Hans Hermann | Hello! gives it somewhere a (possible simple) Possibility (z. B. How in Perl), Textzeilen of/ one TXT-File alphabetical To sort and at the same time on semidetached-Lines To to check on and To bereinigen? Vielen Thanks! Hans |
|
|
| |
|
|
|
Jörg Sellmeyer | Hello Hans,
i'd The Textdatei in a (unsichtbare) sortierte Listbox invite and then with GetString each Lines vergleichen. thereby will need you then always only benachbarte Lines vergleichen and discovered double rausschmeißen. Greeting Jörg |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 10/22/11 ▲ |
|
|
|
|
| |
|
| |
|
|
|
Julian Schmidt | here one View source To Jörgs suggestion... CompileMarkSeparation
Proc AddTextFileToListBox
Parameters liste&,file$,reset%
Declare tempedit&,size&,anzahlzeilen%,i%,buf#
FindFirst$(file$)
Case %IOResult: Return 0
Case reset%: SendMessage(liste&,$0184,0,0)'ListBox je nach Option leeren
Let tempedit&=Create("MultiEdit",GetActiveWindow(),"",0,0,0,1)
Set("FileMode",0)
Assign #1,file$
OpenRW #1
size&=GetFileSize(#1)
Dim buf#,size&+1
BlockRead(#1,buf#,0,size&)' Dateiinhalt einlesen...
CloseRW #1
SendMessage(tempedit&,$0C,0,buf#)'... und in temp. Edit schreiben
anzahlzeilen%=SendMessage(tempedit&,$0BA,0,0)
Dispose buf#
While i%<anzahlzeilen%
AddString(liste&,GetString$(tempedit&,i%))
Inc i%
Endwhile
DestroyWindow(tempedit&)' temp. Edit freigeben
Return 1
EndProc
Proc Delete_Double_Entries
Parameters liste&
var counter%=0
while counter%<>Getcount(liste&)-1
if GetString$(liste&,counter%)=GetString$(liste&,counter%+1)
DeleteString(liste&,counter%)
else
counter%=counter%+1
Endif
Endwhile
Return 1
EndProc
Cls
var listbox&=Create("ListBox",%hwnd,1,0,30,width(%hwnd),height(%hwnd)-30)
AddTextFileToListBox(listbox&,$WinPath+"\WIN.INI",1)
whileloop 10
AddString(listbox&,"Das ist ein Test")
Endwhile
print "Win.ini + 10 mal den String 'Das ist ein Test' eingeladen..."
waitinput
Delete_Double_Entries(listbox&)
print "Doppelte Listebox-Einträge entfernt"
While 1
WaitInput
s4 href='./../../funcion-referencias/XProfan/endwhile/'>Endwhile
The procedure AddTextFileToListBox stammt generally from [...]
[OFFTOPIC]hmm...If was faster [/OFFTOPIC]
LG
Julian57 |
|
|
| |
|
|
|
| iF (23.10.11)
simply with the Search supra time "doppel" prompt.
@Julian: integrally beautiful umständlich.
rather mere with input in link with addString or still fgc (file_get_contents) ( [...] ) and then explode and MoveArrToList. |
|
|
| |
|
|
|
| |
|
| |
|
|
|
Julian Schmidt | iF (23.10.11)
@Julian: integrally beautiful umständlich. rather mere with input in link with addString or still fgc (file_get_contents) ( [...] ) and then explode and MoveArrToList.
I say Yes I Have The procedure just übernommen.....[...] can already his the it leichter goes. was even one old View source |
|
|
| |
|
|