Program script components make it possible to use simple script language to manipulate knowledge element components (and not only). This makes it possible to create interactive presentations, animation, video subtitling, etc.
To create a script do the following:
create an knowledge element in the desired shape
add a program script component from the editing toolbar
right-click the component and choose Script on the pop-up menu
- write the script and choose OK
While writing the script, use the script editor’s pop-up menu that makes it possible to insert full command syntax into the editor (right-click the editor to open the pop-up menu).
For example, to repeatedly play music from a sound component designated by number tag 3, you could write:
To view component number tags click 148 speed-button on the editing toolbar, or choose Component Order on the element pop-up menu. Note, that when you right-click within the element window, you will either open a component pop-up menu (if you click over a component) or element pop-up menu (when you click an empty area within the element).
Note: apostrophe is reserved in scripts for delimiting string variables. If you need to include an apostrophe in a string, use a backquote instead. For example:
TEXTOUT 3 ‘I`m delighted to have met Monica’
For a detailed description of scripts see Script commands used in SuperMemo