This emulator is proving to be a bit of a challenge! I have re-written the beast a couple of times, and played with the real thing to see how it works. The real Auto star is not very forgiving - as you may have found out. There is logic in how it works, it is just not very easy to work out quite what it is.
It has been straight forward enough to parse the tour (he says), and I decided to do all the syntax and structural checking up front to make the running of the tour less complicated. The checker doesn't do number range validation and one or two other checks to ensure that there are no spurious characters at the end of the lines, but it works well now - I even found errors in a tour which Autostar accepted!
I placed the parsed tour into a set of arrays so that I can move up and down the tour freely during execution - just as you can do in reality. The trick is going to be in the interaction between enter, mode, go to and the up and down arrow keys! The arrow keys only adjust scroll speed at the moment, they can't be used to move around the tour.
I'm pretty chuffed about the display! It used absolute positioning and style sheets to format the textarea. It has only been tested in IE6 so I would be interested to hear if it works/has problems in any other browsers. The scrolling was fun - getting it to decide dynamically whether to scroll or not.
// 1.0 Graphics only.
// 1.1 Initial functionality added for limited command set.
// 1.2 Start again! Order Parsing Added.
// 1.3 Scripting for full Command set added.
// 1.4 Testing of RA/DEC format made less restrictive (Thanks to Mike Weasner for pointing this out).
// Now handles double quotes and unmatched double quotes in descriptions.
// 1.5 Less restrictive with object numbers (Thanks to Ken Martin for finding this one).
// 1.6 Moved code into include file (autostar.js) to tidy up a bit!
// 1.7 Now changed to a stand-alone page.
The Autostar Tour Tester was written by Jonathan Bradshaw (c)2002 - 2006
It's free to copy and use for non commercial purposes, but credit would be appreciated if you wish to alter and/or republish it.
Please give feedback to me at