Reading/Writing a preference file with a AS

There’s an example of this on this weeks Script of the Week page. See script #2
[url=http://bbs.applescript.net/scriptotw.shtml]http://bbs.applescript.net/scriptotw.shtml[/url]