|Top Previous Next|
Please read this advanced topic only if you want to alter the supplied lessons or write your own lessons. For normal program use you do not need this information.
NuCode is able to respond to certain lines in text files by altering program settings. This is how the Lesson files prepare the program for each lesson. These special lines, all beginning with the // character pair are called commands and they conform to a set of rules…the command syntax.
If you are planning to modify the supplied lessons or even write your own course then this topic contains the information you need. Another source of information is the supplied Lesson files themselves.
General information follows:
The Use Lessons option must be checked for file commands to be recognized.
Any text to be played as code must appear at the end of the command list. If the command syntax is correct and the Use Lessons is checked then the command lines will not be played as code.
The lesson files are all text files that can be edited using any text editor. If you use a word processor then please be sure to save your files in text only format.
The file commands must all appear as a contiguous group of lines at the start of the file. NuCode assumes that the first line that doesn’t start with a // character pair is the start of text to be played as code. Any command lines that appear later would be ignored or played as code.
Any file command that is not recognized will be ignored. This allows lines beginning with the // character pair to be used as comments.
Many commands have a parameter list. The parameter list immediately follows an = symbol which follows the command itself. Multiple parameters are separated by commas.
Letter case is ignored in the commands.
Usually, only a subset of the available commands will be needed. If a command is not present (or has incorrect syntax) then the most recent command setting, or the setting loaded on program startup will be used by default.
List of commands and explanations follows:
If filename exists this command enables the Next button in the Supplementary lesson window. Clicking on the Next button will subsequently select and load <filename>
If filename exists this command enables the Previous button in the supplementary lesson window. Clicking on the Previous button will subsequently select and load <filename>
This checks or unchecks the Play sound when time up control on the options page.
If the user achieves an accuracy of nn% in the current code session and the number of characters typed is greater than the Accuracy slider on the Options page then the Stop button is automatically pressed.
When the user achieves an accuracy of greater than 80% then the Stop button is automatically pressed.
This sets the random Length of groups control on the options page. It can also be used to select Filters options. The required filters are selected by listing them after the group length, separated by commas. Each group is represented by a number:
Set random group length to 5 and enable all filters.
Sets the File read mode on the Play code page. Here are the mode numbers and their meanings:
Sets NuCode to read characters at random from the selected file.
Sets the Hide option for the user typed window
Sets the Hide option for the Code sent window.
Sets the accuracy slider on the Options page. Allowed values for nn are between 1 and 255 inclusive. Note, the actual slider position will sometimes be “corrected” to a number close to nn.
Example: //accuracy=19, actual slider position will be set to 16
Sets the Pause at end of words control on the options page.
Example: //pause=no, NuCode will not wait for the user to catch up
Sets the Automatic spaces control on the options page. Should always be set to <no> be used if a pause=yes command was used.
Example: //auto=yes, NuCode will add a space to users typing when code sent reaches end of word.
Sets the Clear on restart control on the Options page.
Example: //clear=yes. Previous window contents are cleared when code play starts.
The session timer sounds an alarm after nn seconds. To make the code stop nn should be a negative number. To turn the session timer off set nn to 0
At 60 seconds the timer alarm will sound and code will stop.
Sets the Stop code at end of file or paragraph control on the Options page.
Code play will stop when the end of file is reached.
Switches the autospeed feature on/off. This is equivalent to checking one of the autospeed controls on the options page.
If increase is selected then follow this with a number between 1 and 60 to set how quickly the speed increases.
If adjust is selected then use a number between 1 and 20 to indicate how often speed should be adjusted.
If constant is selected the feature is switched off.
Adjust speed to user responses every 10 seconds.
CODESPEED=<15,20><character pauses><word pauses>
Sets the speed for the code. Character speed can be 15 or 20 WPM. The character pauses can be set to a number from 1 to 20. 1 is standard Morse code while 20 gives large pauses. You may need to experiment to find the overall speed resulting from combinations of character speeds and character pauses. For example a character rate of 20 WPM combined with a character pause slider position of 6 gives an overall text speed of 8 WPM. The same applies to the word pause parameter, set it to 1 for normal pauses.
Sets character speed to 20 WPM, overall speed to 8 WPM with no extra word pauses.
Sets a title for the lesson. The title appears at the bottom of the supplementary lesson window in the status bar. Note, if a file title is not specified then the supplementary lesson window will not be displayed. This is deliberate and is a way to set up the program without displaying a supplementary page.
Example: //FileTitle=Introduction to the lessons.
This command has no parameters. However, all of the following command lines will be displayed as text on the supplementary lesson page. Each of the following lines must begin with the // characters. To some extent the displayed text is self-formatting. However, to force line feeds you can add blank lines, ones with just the // characters and no other text. These lines will be displayed until another valid command or a none command line is encountered.
//Welcome to the NuCode lessons!
This operates just like the STARTTEXT command except that it will appear when the user (or the program) operates the Stop button during a code session. The text will be displayed in the supplementary window in red.
//This concludes Lesson 1. Click on the Next button below to start Lesson 2.
End of command list.