English
Forum

Help txt-File

 
now try I already since Meet a txt-File einzulesen, but my know streikt.
The File contains several Lines and Split The How follows aufgebaut are:
row1: "text";"erklärung";Artikel";"Bemerkung"; etc......
row2:"Wohnugssuche";"Mein Name";"Zeitung";"Rundschau of 23.08.2011"; etc ...
one sees means different sizes into Textzeilen (without Zeilex:" before it)
I need a Listbox where me The suitable row displayed becomes, I these Mark can and then spend can in a Window.
but it should not The whole row outputted go, separate The values in String$.
means A1$ should z.b. "Text" his, A2$="Erklärung" etc.
The spending then in print "Text :" A1$
print "text :" a2$ etc..
have me virtual it would simply (with the example Csv what here Topic was) but far gefehlt.
who can me here help.
here yet my attempt

already time thanks beforehand for eure ideas.
Frank
'-Begin-----------------------------------------------------------------
Declare Text$, electoral$, tex$, lin1$, lin2$, lines$[96000],c&
declare number$,name$
'-an large Box to display one Textes-----------------------------
ClearList
Assign #1,"h:\Test\example.csv"
Reset #1
input #1,lin1$
input #1,lin2$

WhileNot @Eof(#1)

    Input #1,name$
    lines$[c&]=name$
    inc c&
    AddStrings name$

EndWhile

Close #1
tex$ = @$ ListBox("csv",1)
cls
print substr$(lines$[tex$],2,"\\")
waitinput
'-End-------------------------------------------------------------------
End
 
09/24/11  
 




Nico
Madysa
ListBox$ gives as Result not The number the Line, separate The selected row as String.
it ought to means sooner hot:
print substr$(tex$,2,"\\")

there Tex$ one String is, is it no number, into eckigen clinging having but only numbers something lost.
 
09/24/11  
 




Jörg
Sellmeyer
you should no Lisbox, separate a GridBOX (too List view called) use. so can You whom Text each in a row standing and nevertheless Zellenweise hereon grab.

Perhaps helps you this example already time moreover:
Declare File$,row$
Declare lb&
Datei$ = $WinPath + "\\win.ini"
Cls
lb& = Create("GridBox",%hwnd,"Eintrag 1;0;198;Eintrag 2;2;198",0,10,10,400,400)
Set("ListDel","=")
Assign #1,File$
Reset #1

WhileNot EoF(#1)

    Input #1,row$
    AddStrings(lb&,row$)

Wend

Close #1
Set("ListDel","|")

While 1

    WaitInput

    If Clicked(lb&)

        If GetCurSel(lb&) > -1

            row$ = GetString$(lb&,GetCurSel(lb&))
            MessageBox(SubStr$(row$,1,"|"),SubStr$(row$,2,"|"),0)

        EndIf

    EndIf

Wend

 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
09/24/11  
 



thanks Nico, but cht weitergekommen be I do not.
thanks Jörg, your code has helped, but with my Listbox is it very the I Search and need.
here the actually code, if it ever someone need.
as File standing of course here csv can but too txt his
Declare Program$
Programm$ = $ GetDir("@")'-- Arbeitspfad in the interpreter mode
Declare File$
datei$ = Program$+"\\example.csv"
Declare Text$, electoral$, tex$, lin1$, lin2$, lines$[96000],c&
Declare number$,name$
ClearList
Assign #1,File$
Reset #1
input #1,lin1$
input #1,lin2$

WhileNot @Eof(#1)

    Input #1,name$
    lines$[c&]=name$
    inc c&
    AddStrings name$

EndWhile

Close #1
tex$ = @$ ListBox("csv",1)
cls
print (SubStr$(tex$,1,";"),0)
print (SubStr$(tex$,2,";"),0)
' and moreover data
waitinput
'-End-------------------------------------------------------------------
End
 
09/24/11  
 



Topic Please close.............

so trouble umgesetzt, it works everything so How I it need.
Nochmal thanks for Help.

Frank
 
09/26/11  
 




Jörg
Sellmeyer
If you you anmeldest, can You something like (and More) yourself manage.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
09/26/11  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.291 Views

Untitledvor 0 min.
rene1234508/06/13
Julian Schmidt08/05/13
mein06/02/13
RudiB.02/13/13
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie