[Gambas-user] Array query

Fabien Bodard gambas.fr at ...626...
Sun Jan 6 13:34:13 CET 2008


Le Sunday 06 January 2008 13:00:22 lozza1978, vous avez écrit :
> Hi All
>
> I am still working on the progress bar here, thank you Fabien, your example
> was good. (but the progress bar stops @9% when using your example code)
>
> this is my new problem
>
> sResult = "Pos:  30.8s    768f (11%) 55.44fps Trem:   1min  85mb  A-V:0.011
> [2472:192]"
>
> FOR EACH sLine IN Split(sResult, "n")
>
> then scan for the correct section of the stream
> FOR EACH sElt IN Scan(sLine, "Pos: * * *fps Trem:*")
>
> I then spilt the stream again to get rid of the () Brackets
> Elt = Split(sElt, " n", ")")
> Elt = Split(sElt, " n", "()")
an error from mine



 PUBLIC SUB Contents_Read()

 DIM sLine AS String
dim aString as String[]
READ #LAST, sLine, Lof(LAST)
aString = Scan(sLine, "Pos: *s *f (*%) *fps*")
if aString.Count > 2 then 
        ProgressBar1.Value = Val(aString[2])/100
endif
END

this will work

each space in the scan pattern is important :)




More information about the User mailing list