contents   index   previous   next



SElib.ShellFilterCommand()

syntax:

SElib.ShellFilterCommand(functionFilterCommand)

where:

functionFilterCommand - identifier, the name of a function to use to filter commands to a ScriptEase shell.

 

return:

void.

 

description:

Adds a command filter function to a ScriptEase shell. When ScriptEase is running as a command shell, that is, when a ScriptEase interpreter is executed with no arguments, this method allows a function to be installed which is called when commands are entered in a shell. For example, the autoload.jse script that ships with ScriptEase uses this method to implement commands, such as CD and TYPE.

 

The function, functionFilterCommand, must conform to the following:

 

function functionFilterCommand(command)

 

command - a string, the current string on a shell command line. This string is read/write and may be changed by the function. A ScriptEase shell executes the command after returning from this function. To prevent ScriptEase from executing any command set command to a zero-length string, for example, command[0]='\0', but not command="".

 

Before passing a command line to a filter function, ScriptEase strips leading white space from the beginning and end of the command string. Also, any redirection on a command line is not seen by this function, since redirection is handled internally by ScriptEase. For example, if a command line string is "dir>dir.txt", then this function only sees the string "dir".

 

see:

SElib.ShellFilterCommand(), autoload.jse

 

 


SElib.spawn()