TinyTERM CScript User's Guide
1 Overview
CScript is Century
Software's object-oriented, JavaScript-compatible scripting language that you
can use to manipulate, customize, and automate the TinyTERM environment.
Through CScript, you can provide your users with automated startup, login,
logout, file transfer, and remote system access. Because CScript resembles the
functionality and syntax of JavaScript, learning CScript is very easy, and you
can find many JavaScript resources both in print and on the Internet.
2 Creating Scripts
You can create
CScript scripts within the TinyTERM emulator or with any text editor. When
creating or editing scripts within a text editor, save your script files with
the .cs file extension.
1. Choose Script Editor from the Tools menu.
2. Click New.
3. Enter your script
in the Text box.
4. Click Save As and save your script.
3 Executing Scripts
You can execute
scripts from within the Script Editor dialog box or with the Execute Script
File command on the Tools menu.
1. Choose Script Editor from the Tools menu.
2. Click Open, and choose the script you want to
execute.
3. Click Run.
– or –
1. Click the Execute Script button on the ribbon
bar, or choose Execute Script File from
the Tools menu.
2. From the dialog
box, choose the script you want to execute and click OK.
You can also set
session properties in the TinyTERM emulator's user interface to execute scripts
post-startup, post–session start, post-connect, post-login, pre-logout,
pre-disconnect, pre–session close, and pre–application exit.
4 CScript Command and Operators
CScript supports the
following list of JavaScript commands and keywords:
break
continue
else
for
function
if
in
new
return
this
var
while
with
CScript supports
these additional commands that use syntax borrowed from the C language:
case
default
global
goto
switch
CScript supports the
following operators in the following order from lowest to highest precedence:
=, +=, -=, *=, /=, %=, &=,
|=, ^=, <<=, >>=,
>>>= assignment
? : conditional
|| logical
or
&& logical and
| boolean
or
^ boolean
xor
& boolean and
==, != logical compare
<, <=, >, >= logical
compare
<< logical shift left
>> arithmetic (signed) shift right
>>> logical (zero-filled) shift right
+, - addition,
subtraction
*, /, % multiplication, division, modulo
- unary
minus
~ boolean
not
! logical
not
typeof return string expression type
void eval
expression and return nil
new create
new object
++ pre/post
increment
-- pre/post
decrement
[ ] property
reference, vector index
. property
reference