| A Simple Lesson | Commands | Log File Data | Writting a Dialog |
Here is a simple lesson on home row that could be stored in a file called
01.lsn.
| /*Learn Home Row Keys
asdfjkl; ;lkjfdsa /*The Home Row lesson is finished |
Learn Home Row Keys will show up in the Window Title as the lesson
begins.
The typist will then be required to type asdfjkl; ;lkjfdsa in
order to complete the lesson.
The Home Row Lesson is finished will appear in the Window Title
when the lesson is finished.
The typist's grade data will
be saved in the 'tutorlog.dat' file in the typingtutor/log folder and a
"Key Statistics" window will appear showing how many keys were missed and
how many times they were missed.
If TTServer is running and TypingTutor was able to establish a TCP/IP
connection then the grade data is also stored on the TTServer machine in
the 'grades.dat' file in the typingtutor/log folder.
| /*Dialog | Display a Dialog with information. |
| /*Reset score | Reset score and time to zero. |
| /*Show keys asdf | Show the keys listed. In this example the keys are: asdf |
| /*Hide keys asdf | Hide the keys listed. In this example the keys are: asdf |
| /*Show all keys | Show all keys. Hidden keys will appear. |
| /*Hide all keys | Hide all keys. |
| /*Erase | Erase all the letters the student has typed. |
| /*pause | Pause the clock that calculates Words/Minute. |
| /*continue | Un-pause the clock that calculates Words/Minute. |
| /*stop typing | Unable to start a new lesson without restarting program or encountering
the /*start typing command.
Be careful with this command! |
| /*start typing | Allow the starting of a new lesson. |
| /*Shoot | Continue typing in the "Shoot" game mode. |
| /*save log file | Save the current typing data to the log file. |
| /*show key statistics | Show how many times keys are mistyped. |
| /*Some Text to show in the Window Title | Any other text following the /* will be placed into the Window Title Bar. |
Note that all commands begin with /*.
Commands must be typed exactly as above with the same spacing (all
spaces are only one space).
Commands are not case sensitive.
TypingTutor only looks at the beginning of most commands.
This means most commands may end in a comment.
Here is a command followed by a comment:
/*pause Pause the clock in this lesson so the student
can study the dialog instructions
Comments are sometimes helpful to the lesson author for clarification.
Data is saved when the typist finishes a lesson or when a /*save
log file command is found in a lesson.
The data is saved in a log file on the local hard drive.
Data is also saved to the TTServer when running in client/server mode.
The log file is comma delimited for easy analysis in a spread sheet.
Network users may analyze the log file in the TTServer.
The Format for a Dialog is as follow:
/*Dialog
/*Title Dialog Title text
A sentence of dialog text
Another sentence of dialog text
Another sentence of dialog text
Another sentence of dialog text
/*End dialog
It is very important that any dialog contain at least two lines of text
- a title and one message line!
| /*Dialog | Command to bring up a dialog. |
| /*Title Dialog Title text | The Dialog Window Title |
| A sentence of dialog text | The first sentence of text in the dialog |
| Another sentence of dialog text | The second sentence of text in the dialog |
| Another sentence of dialog text | The third sentence of text in the dialog |
| Another sentence of dialog text | etc. |
| /*End dialog | End of this dialog. Case is important |
The user may exit the dialog with the ESC key, the ENTER key or a mouse click on the CANCEL or OK buttons.
00sample.lsn and 01.lsn have examples of dialogs for you to examine.
| /*title | Set the Dialog's title. |
| /*newline | Put a blank line of text in the dialog. |
| /*width number | Set the width of the dialog to number pixels. |
| /*height number | Set the height of the dialog to number pixels. |
| /*width+ number | Change the width of the dialog by number pixels. |
| /*height+ number | Change the height of the dialog by number pixels. |
| /*setx number | Set the x location of the dialog to number pixels. |
| /*sety number | Set the y location of the dialog to number pixels. |
| /*backcolor colorname | Set the background color for the dialog text.
type a color for colorname Colors that work: white black blue red yellow green cyan magenta lightgray darkgray orange pink |
| /*forecolor colorname | Set the foreground color for the dialog text.
The same color work for colorname as do for backcolor. |
Here is a simple dialog that uses embedded commands:
/*Dialog
/*Title Dialog Title text
The first line of dialog text
The second line of dialog text
/*backcolor black
/*forecolor red
/*width 400
/*height 200
/*setx 0
/*sety 0
/*End dialog
| /*Dialog | Tells TypingTutor to build a dialog. |
| /*Title Dialog Title text | The dialog title. Leading and trailing spaces are ignored. |
| The first line of dialog text | The first line of text in the dialog. |
| The second line of dialog text | The second line of text in the dialog |
| /*backcolor black | Set the text background color to black. |
| /*forecolor red | Set the text foreground color to red. |
| /*width 400 | Set the dialog width to 400 pixels. |
| /*height 200 | Set the dialog height to 200 pixels. |
| /*setx 0 | Set the x location of the dialog to 0 pixels. |
| /*sety 10 | Set the y location of the dialog to 10 pixels. |
| /*End dialog | Stop building this dialog and show it. |
The order of the commands does not matter.
The same dialog could be build this way:
/*Dialog
/*Title Dialog Title text
/*width 400
/*height 200
/*backcolor black
/*forecolor red
The first line of dialog text
/*setx 0
/*sety 0
The second line of dialog text
/*End dialog
The only commands that must appear in any special order are:
/*Dialog
and
/*End dialog
/*Dialog - must appear as the first line of any dialog declaration.
/*End dialog - must appear as the last line of a dialog declaration.
/*Dialog
/*End dialog