Teletext Scripts

Before we begin:

Possible Security Implications

There are several calls which could cause problems if used maliciously. These are: Too a lesser degree, selfexec() could pose a small problem.

It is up to you to be vigilant. It is easy for a malicious person to abuse the script system to delete files or reconfigure your computer. Scripts cannot read external files that are not Teletext frames, so any script which calls, say, a BASIC or Absolute 'helper' program should be treated with suspicion. It may be valid, or it may be a program to generate emails with your internet login passwords within. You think that's difficult on a RISC OS machine? Open a task window, right now, and type:
*. Inet:files.ppp
Does it show either CHAPSecret or PAPSecrets? Yes? Read them. There's your login ID, a star character, and your password.
Now, some people on the comp.sys.acorn newsgroups would scream and shout at me mentioning this publically. I disagree. Security through obscurity only goes so far. Sooner or later we'll have to face up to software creating 'sensitive' files, and leaving them behind when it should not, is what we really should be complaining about.

Either way, take care when fetching an unknown Teletext script. The language is not too difficult, so always read the script through before using it.

For a light-hearted look at a possible security implication (let's call it a PSI, shall we?!?), take a look at the 'helloworld' script!

 

All scripts featured here will be available in two forms. You will be able to download the raw script, and/or you can view the annotated version that explains a little bit about what the script does, and how it does it.

 

 

Experiments in fetching the news...

bbcnews
This script fetches the news articles (BBC Ceefax p104-124) and presents them to you as a summary.
It takes approx. four and a quarter minutes, due to the speed of the page refresh.
bbcnews.txt (1210 bytes) View / download the script. By Richard Murray (2002/01/07)
bbcnews View an annotated explanation of how the 'bbcnews' script works.

 

bbcnewsfast
The bbcnews script is okay, but it is slow. This experimental version fetches a page, then fetches ten pages further - effectively swallowing two pages each time around. Thus, it takes approx. two and a quarter minutes, twice as fast as bbcnews.
bbcnewsf.txt (1778 bytes) View / download the script. By Richard Murray (2002/01/07)
bbcnewsf View an annotated explanation of how the 'bbcnewsf' script works.

 

bbcnewswhizz
Quite a sexy little script, this fetches all the pages and then processes them. The fetch grabs four pages each time around.
This takes one minute and fifty nine seconds, showing that there is only so much speed that you can have; thought it is useful as a different way of doing this (fetch then process; instead of fetch and process), and it shows how to write a neat compact little script...
bbcnewsw.txt (989 bytes) View / download the script. By Richard Murray (2002/01/07)
bbcnewsw View an annotated explanation of how the 'bbcnewsw' script works.

 

bbcnewswhizz 2
This expands upon bbcnewswhizz to bring in control of polling. This script, and bbcnewswhizz, will most likely not work properly on an older machine...on my ARM7 machine, if I have a number of tasks running or if I'm in a high colour mode, then pages tend to be skipped, defeating the purpose of this script.
bbcnwsw2.txt (1214 bytes) View / download the script. By Richard Murray (2002/01/07)
bbcnwsw2 View an annotated explanation of how the 'bbcnwsw2' script works.

 

Floating point maths

wthrnnts
This script fetches, from CNN, the 'current' weather in Nantes. It outputs to file the weather as shown on the teletext page. It then reads the celsius temperature, and calculates the temperature in Fahrenheit.
Yes, I know the teletext page gives both. This demonstrates 'find'ing things on a page, and also performing calculations.
wthrnnts.txt (2028 bytes) View / download the script. By Richard Murray (2003/05/15)
wthrnnts View an annotated explanation of how the 'wthrnnts' script works.

 

eurorate
This script fetches (from CNN) the Euro rates to the Sterling pound, American dollar, and the Australian dollar. It will then generate a conversion table from 5 euro to 100 euro, in 5 euro steps.
eurorate.txt (3090 bytes) View / download the script. By Richard Murray (2003/05/15)
eurorate View an annotated explanation of how the 'eurorate' script works.

 

Bringing it all together...

!startup
This is my main script. It does:
  • Fetches a couple of pages from CNBC
  • Fetches a number of pages from CNN
  • Generates an OvationPro document, containg all of the fetched pages.
  • Displays the document to me.
This means, now, that instead of taking time to read the pages, waiting for each to arrive, I can simply instruct !Teletext to fetch them, then display them to me when it has got them all.
Lovely.
startup.txt (4220 bytes) View / download the script. By Richard Murray (2003/05/15)
startup View an annotated explanation of how the '!startup' script works.

 

Frivolities!

helloworld
Totally frivolous and nothing to do with Teletext!
 
This script creates, from scratch, an 'Absolute' executable that prints "Hello world!" on the screen...and then it runs it!
hllowrld.txt (740 bytes) View / download the script. By Richard Murray (2003/05/15)
hllowrld View an annotated explanation of how the 'hllowrld' script works.

 

Can YOU help?

If you have written any useful scripts, then PLEASE send them in to me for inclusion here...
Thank you.

 


Return to !Teletext index
Copyright © 2003 Richard Murray