[Gambas-user] Get one line from text
Kende Krisztián
nemh at ...2007...
Sat Aug 17 23:28:14 CEST 2013
> Hi all.
>
> I need your help.
> I cant get one line from text.
>
> My text is:
>
>
> #!/usr/bin/env xdg-open
>
> [Desktop Entry]
> Version=1.0
> Type=Application
> Terminal=false
> Name[uk_UA]=Грибоїд
> Exec=/Games/Kids/Грибоєд/Griboed_exec
> Icon=/Games/Kids/Грибоєд/1857.png
> Comment[uk_UA]=Грибоїд
> Name=Грибоїд
> Comment=Грибоїд
> Encoding=UTF-8
>
>
>
>
> How can I get string:
> "Icon=/Games/Kids/Грибоєд/1857.png"
>
> Thanks.
>
Dim ofile As File
Dim cline As String
ofile = Open "/path/filename.desktop" For Read
While Not Eof(ofile)
Line Input #ofile, cline
If InStr(cline, "Icon=") = 1 Then Print Right(cline, -5)
Wend
Close #ofile
More information about the User
mailing list