; 120701 test script
script "120701Test"

; We'll load a file into the cache, then try to export it as tidy ASCII.

; Movie review of '1st Daughter'. Just happens to be what was on that day.
cache_insertfile("<Teletext$Pages>.1stdaughtr", -1, -1)
selectframes(145, 6)

; Omit header line
omitline(1)

; Omit title
omitline(2)
omitline(3)
omitline(4)
omitline(5)

; Omit footer and adverts
omitline(21)
omitline(22)
omitline(23)
omitline(24)
omitline(25)

; Push the edited frame back into the cache
storeframe()

; Output to file (using specific frame/subframe number, to test /that/ works)
filewrite("<Wimp$ScrapDir>.ttxtemp")
appendgivenframe(145, 6, 2)
fileclose()
filetype("<Wimp$ScrapDir>.ttxtemp",&FFF)
oscall("Filer_Run <Wimp$ScrapDir>.ttxtemp")

; Done
terminate()
