If you want the users to be able to interact with your module through the text interface, you need to accept script commands.
To do this, you must first register a keyword. When a script command use this keyword, the complete command will be sent to your parser.
|
|
Script_Register
|
This function is used to register your command key word.
|
|
|
Script_Parse
|
This function is used to parse a command that use your keyword. This function is called by sliceO when a script command was entered in the program and that command start with the same key word as the one you registered. The same key word can be registered by multiple modules, so if the arguments of this command are not recognized by your module, you should return "0" so that sliceO will try other modules. If you return "1", it signal that you have recognized this command and acted on it.
|
You can also save script commands when the user do a "save as script" so that re-reading that script will reset your module to the same state as it was when the save command was issued.
|
|
Script_Save
|
This function is used to save script commands. This function is called by sliceO when the user select "save as script" in the main menu. The idea here is that you save script commands that your module will be able to read back in order to bring your module back to the same point as when the script where saved.
|