Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Kanye REST
#7
Requires the file "quotes.json". If it's in the same format it doesn't matter who the speaker was, does it?

Code: (Select All)
$CONSOLE:ONLY
dim as long ff, ll, l, ts

ts = (val(mid$(time$, 4, 2)) mod 2) * 60 + val(right$(time$, 2))

afile$ = "quotes.json"
ff = freefile
open afile$ for input as ff
do until eof(ff)
    line input #ff, aline$
    if aline$ = "[" then
        ll = 0
    elseif aline$ = "]" then
        exit do
    else
        ll = ll + 1
    end if
loop
close ff

redim sf$(1 to ll)
ff = freefile
open afile$ for input as ff
do until eof(ff)
    line input #ff, aline$
    if aline$ = "[" then
        l = 0
    elseif aline$ = "]" then
        exit do
    else
        l = l + 1
        aline$ = _trim$(aline$)
        if l = ll then
            sf$(l) = mid$(aline$, 2, len(aline$) - 2)
        else
            sf$(l) = mid$(aline$, 2, len(aline$) - 3)
        end if
    end if
loop
close ff

print sf$(ts)
print "- Kanye West"
system
Reply


Messages In This Thread
Kanye REST - by SpriggsySpriggs - 12-08-2022, 07:50 PM
RE: Kanye REST - by SMcNeill - 12-08-2022, 08:03 PM
RE: Kanye REST - by Jack - 12-08-2022, 08:36 PM
RE: Kanye REST - by SpriggsySpriggs - 12-08-2022, 09:04 PM
RE: Kanye REST - by Jack - 12-08-2022, 09:22 PM
RE: Kanye REST - by bplus - 12-09-2022, 12:11 AM
RE: Kanye REST - by mnrvovrfc - 12-09-2022, 05:28 AM
RE: Kanye REST - by SpriggsySpriggs - 12-09-2022, 03:52 PM
RE: Kanye REST - by grymmjack - 04-28-2023, 02:52 PM



Users browsing this thread: 1 Guest(s)