SElib.ShellFilterCharacter()
syntax: |
SElib.ShellFilterCharacter(functionFilterCharacter, allKeys) |
where: |
functionFilterCharacter - identifier, the name of a ScriptEase function to use to filter characters.
allKeys - boolean, specifies whether the functionFilterCharacter is called for every keystroke or just for keys that are not ordinary printable characters, such as function keys. The return of the method Clib.isprint() corresponds to the difference in keys that allKeys affects.
|
return: |
void.
|
description: |
Adds a character 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 the installation of a function to be called when keystrokes are pressed. For example, the autoload.jse script that ships with ScriptEase uses this method to implement command line history and filename completion.
The function, functionFilterCharacter, must conform to the following:
function functionFilterCharacter(command, position, key, extended, alphaNumeric)
command - string, the current string on the shell command line. This string is read/write and may be changed by this function.
position - number, the current cursor position within the command string. This position may be altered by this function.
key - number, the key being pressed. This parameter may be altered by the function. Set key to zero, 0, to ignore keyboard input.
extended - boolean, true if the current keystroke is an extended keyboard character, that is, a function key, a keyboard combination, and so forth.
alphaNumeric - true if the current keystroke is an alphabetic or numeric key. The return of the method Clib.isalnum() corresponds to alphaNumeric.
return - boolean, true if the command line must be redrawn or the cursor position moved, based on the actions in this function.
|
see: |
SElib.ShellFilterCommand(), Clib.isalnum(), autoload.jse
|