Recent Changes - Search:

Writing Lessons for TypingTutor

TypingTutor Commands

TypingTutor by Jidea allows the lesson author to create simple typing lessons or to include several helpful commands
All lessons filenames end with the .lsn extension and are stored in the typingtutor/lessons folder.

Here is a simple lesson on home row that could be stored in a file called 01.lsn.

A Simple Home Row Lesson "01.lsn"

/*Learn Home Row Keys
asdfjkl; ;lkjfdsa
/*The Home Row lesson is finished

Explanation of the Simple Home Row Lesson "01.lsn"

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.

TypingTutor Commands

/*DialogDisplay a Dialog with information.
/*Reset scoreReset score and time to zero.
/*Show keys asdfShow the keys listed. In this example the keys are: asdf
/*Hide keys asdfHide the keys listed. In this example the keys are: asdf
/*Show all keysShow all keys. Hidden keys will appear.
/*Hide all keysHide all keys.
/*EraseErase all the letters the student has typed.
/*pausePause the clock that calculates Words/Minute.
/*continueUn-pause the clock that calculates Words/Minute.
/*stop typingUnable to start a new lesson without restarting program or encountering the /*start typing command. Be careful with this command!
/*start typingAllow the starting of a new lesson.
/*ShootContinue typing in the "Shoot" game mode.
/*save log fileSave the current typing data to the log file.
/*show key statisticsShow how many times keys are mistyped.
/*Some Text to show in the Window TitleAny other text following the /* will be placed into the Window Title Bar.
Note that all commands begin with /*.
  1. Commands must be typed exactly as above with the same spacing (all spaces are only one space long).
  2. Commands are not case sensitive.
  3. TypingTutor only looks at the beginning of most commands.
  4. This means most commands may end in a comment.
    1. Comments are sometimes helpful to the lesson author for clarification.
    2. Here is a command followed by a comment:
    • /*pause Pause the clock in this lesson so the student can study the dialog instructions

Data Saved into the Log File

Class nameTaken from the students.dat file
Typist nameTaken from the students.dat file
User nameTaken from the OS
File nameName of the completed lesson
correctNumber of letters & spaces typed correctly
triesNumber of keys pressed
percentcorrect/tries*100
gwamWords per minute (typing speed)
lengthTotal number of letters and spaces in the lesson
lesson timeTotal time spent on the lesson
date + timeDate and time when the lesson is finished
  1. Data is saved when the typist finishes a lesson or when a /*save log file command is found in a lesson.
  2. The data is saved in a log file on the local hard drive.
  3. Data is also saved to the TTServer when running in client/server mode.
  4. The log file is comma delimited for easy analysis in a spread sheet.
  5. Network users may analyze the log file in the TTServer.

A Sample Lesson
Sample home row lesson

Writing a TypingTutor Dialog

To Display a Dialog with important information use the /*Dialog command.
This is helpful to give students instructions like:
Help for first time users.
Instructions about which finger to use for new letters being taught.

The Format for a Dialog is as follows:

/*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!

Line by line explaination of the example
/*DialogCommand to bring up a dialog.
/*Title Dialog Title textThe Dialog Window Title
A sentence of dialog textThe first sentence of text in the dialog
Another sentence of dialog textThe second sentence of text in the dialog
Another sentence of dialog textThe third sentence of text in the dialog
Another sentence of dialog textetc.
/*End dialogEnd 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.

Embedded Commands in a Dialog

You may embed commands in a dialog to control things like dialog title, size, location and text color.

Embedded Dialog Commands

/*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 colors 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

Line by line explaination of the above Dialog Example
/*DialogTells TypingTutor to build a dialog.
/*Title Dialog Title textThe dialog title. Leading and trailing spaces are ignored.
The first line of dialog textThe first line of text in the dialog.
The second line of dialog textThe second line of text in the dialog
/*backcolor blackSet the text background color to black.
/*forecolor redSet the text foreground color to red.
/*width 400Set the dialog width to 400 pixels.
/*height 200Set the dialog height to 200 pixels.
/*setx 0Set the x location of the dialog to 0 pixels.
/*sety 10Set the y location of the dialog to 10 pixels.
/*End dialogStop 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.

What is the smallest dialog I can write?
A dialog must contain at least two lines of text .
Here is an example of the shortest dialog you can write:

/*Dialog
/*End dialog

Edit - History - Print - Recent Changes - Search
Page last modified on July 23, 2007, at 07:28 PM