TERM Script to CScript
Translation Guide
1 Overview
Beginning with the
4.05 version of the TinyTERM emulator, Century Software has added backward
compatibility with previous versions of the TERM emulator's scripting language.
Although version 4.05 does not provide full backward compatibility, you will
find that the most commonly used TERM Script language commands now work in the
TinyTERM emulator product.
2 Running TERM Scripts in the TinyTERM Emulator
To run TERM Script
language scripts, the TinyTERM emulator first translates the TERM Script
language script to CScript. See section 3, "TERM Script to CScript
Translation Table," for a complete list of CScript commands and functions
generated by the TERM Script translator. If the translator can translate the
TERM Script commands without any errors, then the TinyTERM emulator
automatically runs the translated script.
2.1 Executing TERM Language Scripts
You can execute TERM
Script language scripts from within the Script Editor dialog box or with the
Execute Script File command on the Tools
menu or the ribbon bar.
1. Choose Script Editor from the Tools menu.
2. Click Open, and choose the TERM Script
language script (usually a .cmd file) 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 TERM
Script language scripts post-startup, post–session start, post-connect,
post-login, pre-logout, pre-disconnect, pre–session close, and pre–appllication
exit.
2.2 Translation Errors
Supported TSL
commands will translate and run without modification. TSL scripts that do not
execute will generally have one of these problems:
·
Uses commands not
supported in the current version of the TinyTERM emulator
·
Contains syntax
errors
·
Uses macro expansion
that the translator cannot handle
2.3 Unsupported TERM Script Language Features
This version of the
TinyTERM emulation does not support the following TSL features:
·
Dynamic macro
expansion. Where possible, the translator will make the proper substitutions
for macro expansion, but in many cases, the translator will not be able to
determine how a macro will be used during runtime and cannot translate TSL
macros
·
Any command not
displayed in bold in the translation table (see section 3)
2.4 Translation Tips
2.4.1 Script Debugging
The TSL to CScript
translator was designed to translate working TSL scripts, not for debugging
new, untested TSL scripts. This assumes that the TSL script works and does not
contain syntax errors.
2.4.2 Macro Expansion
All macro expansions
must be followed by a digit 0-9 or the '(' character: An error message allows
all expressions to be converted when disallowed.
$1 OK
$2 OK
$(expr) OK
$(toupper(g)) OK
file$(opts) OK
x$(y)z OK
$expr disallowed:
use $(expr)
Currently, all macro
expanded keywords cannot have a space or comma in the macro expanded source
line. A workaround is to place the expression into a new variable in a setvar
statement, then execute the command with the single new variable $(new). This also applies to macro expanded
keynames.
parity none OK
parity $(n) OK
parity $(n ) disallowed
parity $(toupper(x)+" ") disallowed
parity $(fconcat(a,b,c)) disallowed: workaround
setvar x fconcat(a,b,c)
parity $(x)
setkey $(k) "test" OK
Macro expanded
keywords are error checked only when they don't contain a '$' character.
Otherwise, they are passed as variables, not literals.
Filenames can be
macro expanded, along with filename options included in () characters, like
(c). However, long ascii options, like append, cannot be macro expanded. A
workaround is to always use () options instead of long ascii options. The following table shows the equivalences:
append (a)
overwrite (o)
binary (b)
flush (f)
mnemonic (m)
Currently, DO
argument lists cannot have any spaces in them unless the " or ' characters
are used. Macro expansion CAN occur
inside the quoted string, but the same " or ' character cannot be used.
capture disk file OK
capture disk file(o) OK
capture disk file overwrite OK
capture disk $(file) OK
capture disk $(file)(o) OK
capture disk $(file) overwrite OK
capture disk $(file)$(opts) OK
capture disk $(file) $(opts) ERROR
Keynames can now be
quoted strings for all keynames, including original non-quoted strings. Thus f1
and "f1" are now identical. This allows for macro expansion
easily. Keynames can now also be
numeric. Macro expanded keynames must be either string or numeric. If numeric,
they are the value of the key, from 1-450. If string, they can be the either
unquoted for quoted keynames, or if control characters, a quoted string:
setkey f1 menu OK
setkey "^A" menu OK
setkey "f1" menu OK
setkey 1 menu OK
setkey 256 menu OK
The macro expanded
value must have the explicit quotes in it for control characters, and
optionally can for keynames. Thus the following:
setvar x "^A"
setkey $(x) menu WILL ERROR with TSL
setvar x "f1"
setkey $(x) menu OK
setvar x '"^A"'
setkey $(x) menu OK
setvar x '"f1"'
setkey $(x) menu OK (NEW)
Because of this, it
is recommended that all key values be double quoted before being macro
expanded. An alternative is to set a
variable to the numeric value of the key from keyid() prior to the macro
expansion:
setvar x keyid("f1")
setkey $(x) menu
2.4.3 File Handling
In the TERM emulator,
TSL opened files in binary mode. At this time, the TSL scripts translated by
the TinyTERM emulator opens files in ASCII mode, which causes file I/O to
behave somewhat differently than before. As a workaround, you can open the
files using the "RB" or "UB" flags to open files in
read-only binary or overwrite binary modes.
Also, the FREAD
command appends a NULL character to the end of strings. The FREADLN command
also appends NULL characters, but only when you set iByte to a positive value. These extra NULL characters can cause
problems while comparing strings. To work around this problem, you can use the
following code:
SETVAR strbuf
LEFT(strbuf, LEN(strbuf) - 1)
3 TERM Script to CScirpt
Translation Table
To run TERM Script
language commands, the TinyTERM emulator must first translate the TERM Script
language commands into CScript commands. Most of these commands are part of a
compatibility library. (In fact, a future release of CScript might require that
you load a TSL compatibility library before using these commands.)
The following lists
show all the TSL commands and functions that the translator will correctly
handle. The TinyTERM emulator, version 4.05, only supports those commands and
functions listed in bold text.
3.1 Configuration Settings
CAPTURE keyword
filename tsl_capture(
str, file )
keyword = none, disk, device, prtmgr, file, spool, terminal, on, off,
close
filename may be immediately appended by (a), (o), (f), (b), or (m)
CDELAY ilit tsl_cdelay(
n )
COLOR
keyword fcol, bcol tsl_color(
str, str-fg, str-bg )
keyword
= default, reverse, blink, underline, bold, dim
fcol
= default, black, blue, green, cyan, red, magenta, brown, white
bcol
= default, black, blue, green, cyan, red, magenta, brown, white, ltgrey,
ltblue, ltgreen, ltcyan, ltred, ltmagenta, yellow, ltwhite
COLOR
NUMBER ivar tsl_color_number( n )
COMBASE
ivar, ivar, ivar tsl_combase( n, n, n
)
DANSOFF
svar tsl_dansoff(
str )
DAUTOANS
svar tsl_dautoans(
str )
DCONNECT
svar tsl_dconnect(
str )
DESCAPE
svar tsl_descape(
str )
DHANGUP
svar tsl_dhangup(
str )
DINIT
svar tsl_dinit(
str )
DOFFHOOK
svar tsl_doffhook(
str )
DOKSTR
svar tsl_dokstr(
str )
DPREFIX
svar tsl_dprefix(
str )
DRINGSTR
svar tsl_dringstr(
str )
DSUFFIX
svar tsl_dsuffix(
str )
DTIMEOUT
ilit tsl_dtimeout(
n )
DDE
ENABLE tsl_dde_enable(
)
DDE
DISABLE tsl_dde_disable(
)
DDE
NAME svar tsl_dde_name( str )
DDE
TIMEOUT ivar tsl_dde_timeout( n )
DEVPREFIX
svar tsl_devprefix(
str )
EDITOR
filename tsl_editor( file )
EMAILADDR
svar tsl_emailaddr(
str )
EMAILsubj
svar tsl_emailsubj(
str )
EXTGEN
svar tsl_extgen(
str )
EXTXFER
svar tsl_extxfer(
str )
FILLCHAR
chlit tsl_fillchar(
n )
FLAGS
svar tsl_flags(
str )
FONT
svar [, ivar [, ivar ] ] tsl_font( str, nh,
nw )
FTPHOST svar, svar,
svar tsl_ftphost(
strhost, struser, strpass )
HIWAIT
ilit tsl_hiwait(
n )
HTIME
ilit tsl_htime(
n )
ITIME
ilit tsl_itime(
n )
JUMPSCROLL
ilit tsl_jumpscroll(
n )
KEYBOARD
keyword tsl_keyboard( str )
keyword = bios,
extbios, int9, int9n
LCHAR tsl_lchar(
n )
LDELAY ilit tsl_ldelay(
n )
LOCKTIME
ilit tsl_locktime(
n )
LOCKFILE
filename tsl_lockfile( file )
LOGFILE filename[(o)] tsl_logfile( file
)
LOGFILE CLOSE tsl_logfile_close(
n )
MIMEENCODE
filename, filename tsl_memeencode( str, str )
MIMEDECODE
dvar, filename tsl_memedecode( str, str )
MODEM
filename tsl_modem( file )
MODEM
HAYES tsl_modem(
"hayes" )
NETDIALOG
svar tsl_netdialog(
str )
NETNAME
svar tsl_netname(
str )
NETPORT ilit tsl_netport(
n )
NETSTIME
ilit tsl_netstime(
n )
NETTERM svar tsl_netterm(
str )
NETVTNAME svar tsl_netvtname(
str )
NETWORK svar tsl_network(
str )
PAGES ivar tsl_pages(
n )
PRINTER keyword [filename] tsl_printer( str, file )
keyword = none, disk,
device, prtmgr, spool, terminal, on, off, capture, close
PROTOCOL
keyword tsl_protocol( str )
keyword = xon, rts,
etx, none
PROTOCOL
QUIET keyword tsl_protocol_quiet( str )
keyword = on, off
PROTOCOL
DCD keyword tsl_protocol_dcd( str)
keyword = on, off
REDIAL
ilit tsl_redial(
n )
RESTART
ilit tsl_restart(
n )
RETRIES
ilit tsl_retries(
n )
RTIME
ilit tsl_rtime(
n )
SCROLLBACK ivar tsl_scrollback(
str )
SET
ABORT keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
ADDCR keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
ADDEOF keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
ADDLF keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
ALTCHK keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
ALTKEYS keyword tsl_set( int, str
)
keyword = on, off, 1,
0
SET
BLOCKMODE keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
COMPRESS keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
CONSXON keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
CONTROL keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
DDTR keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
DESTBS keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
DIMDIM keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
DLGUNITS keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
DTR keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
ECHO keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
EMAILDEL keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
EOFOPEN keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
ERROR keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
ERRORBOX keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
ESC8BIT keyword tsl_set( int,
str )
keyword = on, off, 1,
0
SET
ESCCTL keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
EXITDISC keyword tsl_set( int, str
)
keyword = on, off, 1,
0
SET
EXITDTR keyword tsl_set( int,
str )
keyword = on, off, 1,
0
SET
EXPLODE keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
EXTEND keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
FILECONV keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
KERMECHO keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
LOG keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
MASKPAR keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
NOSCROLL keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
REVDIM keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
SCALING keyword tsl_set( int, str
)
keyword = on, off, 1,
0
SET
SOUND keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
TABEX keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
TOUPPER keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
RTS keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET
VIEW keyword tsl_set( int, str )
keyword = on, off, 1,
0
SET XFERSTAT keyword tsl_set( int, str )
keyword = on, off, 1,
0
SETKEY
keyname keyword tsl_setkey_cmd( n, str )
keyname = menu,
help, gold, shell, capture, print,
compose, break, abort, scrlineup, scrlinedn, scrpageup, scrpagedn, scrright,
scrleft, scanmode, nextsess, setup, exit, hotkey
SETKEY
keyname str tsl_setkey_macro( n, str )
SETKEY
RESET ivar tsl_setkey_reset( n )
STIME
ilit tsl_stime(
n )
TERMID svar tsl_termid(
str )
TDELAY ilit tsl_tdelay(
n )
TOOLTIPS
ivar tsl_tooltip(
n )
TRANS
keyword [svar, svar] tsl_trans( str, str,
str )
keyword = input,
output, display
TRANS
RESET tsl_trans_reset(
)
VIDBLINK
keyword tsl_vidblink(
str )
keyword = nobios,
bios
VIDCARD
CUSTOM, ax, bx tsl_vidcard_custom(
nax, nbx )
VIDCARD
keyword tsl_vidcard( str )
keyword = none,
graphics, ahead, ati1, ati2, everex, paradise, tecmar, tsent, video7
VIDOUT
keyword tsl_vidout(
str )
keyword = ram,
snow, int10, bios, graphics
VIDUNDER
keyword tsl_vidunder( str )
keyword = none,
font, port
WILDSIZE
ilit tsl_wildsize(
n )
WRUCHAR chlit tsl_wruchar(
n )
XONXOFF
ivar, ivar tsl_xonxoff( n, n )
3.2 Current Connection Configuration Settings
AUTOCMD svar tsl_autocmd(
str )
BAUD word tsl_baud(
str )
CHARSET keyword tsl_charset(
str )
keyword = american,
british, dutch, finnish, french, canadian, german, italian, danish, norwegian,
portuguese, swedish, swiss
EMULATE keyword tsl_emulate(
str )
keyword = vt320, vt320-7, vt220, vt220-7, vt100,
vt102, vt52, ansi, at385, scoansi, wyse60, wyse60-25, wyse-50, tv950, tv925,
tv912, adm1, imb3101, tty
LOGIN tsl_do_login(
)
LOGIN svar tsl_login(
str )
LOGOUT tsl_do_logout(
)
LOGOUT
svar tsl_logout(
str )
MODE keyword tsl_mode(
str )
keyword = full, half, dump, mnemonic, control
NODE svar tsl_node(
str )
PARITY keyword tsl_parity(
str )
keyword = none, odd,
even, space, mark
PASSWORD svar tsl_password(
str )
PORT
svar tsl_port(
str )
REMARK eolstring tsl_remark(
str )
SET BSDEL keyword tsl_set_bsdel(
str )
keyword = on, off, 1,
0
SET WRAP keyword tsl_set_wrap(
str )
keyword = on, off, 1,
0
STARTSERVER tsl_do_startserver(
)
STARTSERVER
svar tsl_startserver(
str )
STOPSERVER tsl_do_stopserver(
)
STOPSERVER
svar tsl_stopserver(
str )
STOPBITS ilit tsl_stopbits(
n )
USER svar tsl_user(
str )
WORDLEN ilit tsl_wordlen(
n )
WRU svar tsl_wru(
str )
XPROT keyword tsl_xprot(
str )
keyword = termcrc,
wtermcrc, xmodemcrc, kermit, compsrvb, xmodem, ymodem, zmodem, ftp, ascii,
line, external
3.3 User Interface Commands
AT
ivar, ivar tsl_at_clreol( ny,
nx )
AT
ivar, ivar svar tsl_atobjinit(
)
tsl_atobjdone(
nid, ntype, nx, ny, nw, nh,
str, nflags, nint1, nint2, echoch, varstr)
AT
ivar,ivar [ID #] [TABSTOP] BUTTON svar,
retval, [keyname]
tsl_atobjinit(
)
tsl_atobjdone(
nid, ntype, nx, ny, nw, nh,
str, nflags, nint1, nint2, echoch, varstr)
AT
ivar,ivar [ID #] [TABSTOP] keyword [ivar[
,ivar[ ,ivar[ ,svar]]]]
tsl_atobjinit(
)
tsl_atobjdone(
nid, ntype, nx, ny, nw, nh,
str, nflags, nint1, nint2, echoch,varstr)
keyword = text, box,
icon, picture, meter, edit, checkbox, radio, keyin
AT ivar,ivar [ID #][TABSTOP] GET var keyword
[ivar[ ,ivar[ ,ivar[ ,svar]]]]
LIST svar
[,svar]...
tsl_atobjinit(
)
tsl_atobjaddlist(
svar)
tsl_atobjaddlist(
svar)...
tsl_atobjdone(
nid, ntype, nx, ny, nw, nh,
str, nflags, nint1, nint2, echoch, varstr)
AT
ivar,ivar [ID #] [TABSTOP] GET var
keyword [ivar[ ,ivar[ ,ivar[ ,svar]]]]
ARRAY svar
tsl_atobjinit(
)
tsl_atobjaddarray(
var)
tsl_atobjdone(
nid, ntype, nx, ny, nw, nh,
str, nflags, nint1, nint2, echoch, varstr)
keyword = popup,
elist, listbox
AT
ivar,ivar [ID #] [TABSTOP] GET var
CLASS
keyward, [ivar[ ,ivar[ ,ivar[ ,svar]]]]
{cenEditBox,
cenIconList, cenIcon, cenPicture, cenFontList}
AT
CLEAR tsl_at_clear(
);
AT
READ [SAVE keyname] [CALLBACK procstring]
[NOWAIT]
tsl_at_read(
nflags, str, key )
AT
SAVE ivar tsl_at_save( n )
ATTR
keyword tsl_attr( str )
keyword = default,
reverse, blink, underline, bold, dim
BELL tsl_bell(
)
CLS tsl_cls(
)
CURSOR keyword tsl_cursor(
str )
keyword = wait, arrow
DISPLAY [expr
[,expr]...] tsl_display(
expr1 )
INIDELSTR svar, svar tsl_inidelstr(
str, str )
INIENUMSECT
dvar, filename, svar tsl_inienumsect( str, file, str )
INIGETFF
dvar, filename, svar, ivar tsl_inigetstr( str, file, str, n )
INISETFF
dvar, filename, svar, ivar tsl_inisetstr( str, file, str, n )
INISETFILE filename tsl_inisetfile(
str )
INISETSTR svar, svar,
svar tsl_inisetstr(
str, str, str )
INISYNC
filename, ivar tsl_inisync( file, n )
MSGBOX svar[,svar[,ivar]] tsl_msgbox( str1, str2, n
)
MENU
ivar OPEN svar [ivar, ivar, [ivar, ivar]
,ivar]
[PARENT
ivar] [HINT svar]
tsl_menu_open(
nid, npid, strtitle,
strhint, ny, nx, nfg, nbg, flags )
MENU
ivar ENTRY svar [EXECUTE svar] [ID ivar]
[HINT svar]
[svar [EXECUTE...]]..
tsl_menu_entry(
pid, itemid, strentry1,
strhint, strex )
MENU
ivar SHOW keyword tsl_menu_show( nid, str
)
keyword = menubar,
lotus, popup
MENU
ivar STATUS ivar, ivar tsl_menu_status( nid,
nitemid, nflags )
MENU
ivar keyword tsl_menu_close( str )
keyword = close, off,
restore
OBJSETFONT
ivar, ivar, svar, ivar [,ivar]
tsl_objsetfont(
n, n, str, n, n )
OBJPAINT
ivar [,ivar] tsl_objpaint( n, n )
OBJADDLIST
ivar, ivar, svar tsl_objaddlist( n, n, str
)
PASTE keyword tsl_paste(
str )
keyword = link, text
PAUSE eolstring tsl_pause(
str )
QUIT
ilit tsl_quit(
n )
REDRAW tsl_redraw(
)
SCREEN
keyword tsl_screen( str )
keyword = copy, print,
noselect
SETCAPTURE
ivar, ivar tsl_setcapture( n, n )
STDFILE
var [,svar [,filename [,svar [,svar
[,ivar]]]]]
var = tsl_stdfile( str, file, str, str,
n )
STDSAVE
var [,svar [,filename [,svar [,svar]]]]
var = tsl_stdsave( str, file, str, str,
n )
WCLOSE
ivar [,ivar]... tsl_wclose( n1
)
WHIDE
ivar [,ivar]... tsl_whide(
n1 )
WMOVE
ivar, ivar, ivar[, ivar] tsl_wmove( n, ny, nx, n )
WOPEN
ivar, ivar, ivar, ivar, ivar[, ivar,
ivar[, ivar[, svar[, svar]]]
tsl_wopen(
n, ny,nx, nh,nw, nfg,nbg,
nstyle, strtitle, strlable )
DLGOPEN
ivar, ivar, ivar, ivar, ivar[, ivar,
ivar[, ivar[, svar[, svar]]]
tsl_dlgopen(
n, ny,nx, nh,nw, nfg,nbg,
nstyle, strtitle,strlable )
WSELECT
ivar tsl_wselect(
n )
WSHOW
ivar[,ivar]... tsl_wshow( n1 )
WTITLE
ivar, svar tsl_wtitle( n, str )
3.4 File Transfer Commands
GET filelist filename tsl_get( str
)
filelist may
be appended by (q) or (x)
filename may be
appended by (c), (f), (t), or (z)
RCV
filename tsl_rcv( str )
filename may
be appended by (c), (i), (s), (t), or (z)
REMOTE eolstring tsl_remote(
str )
Note:
only works with the QUIT command.
SEND filelist tsl_send(
str )
filelist may
be appended by (c), (i), (s), (t), or (z)
SERVER tsl_server(
)
TIME
filelist tsl_time( file )
XFER filelist filename tsl_xfer( str )
filelist may
be appended by (q) or (x)
filename may be
appended by (c), (f), (t), or (z)
3.4 General Commands
ABORT
[ilit] tsl_abort( n )
ADDPMENTRY
svar, svar, svar, svar, svar, ivar
tsl_addpmentry(
str, str, str, str, str, n )
ANSWER
keyword tsl_answer( str )
keyword = off, now,
wait, auto
BATCH
[filename] < no translation >
BREAK tsl_break(
)
CONFIG
GET [ivar] tsl_config_get( n )
CONFIG
NEW tsl_config_new(
)
CONFIG
SET tsl_config_set(
)
CONFIG
READ filename tsl_config_read( file )
CONFIG
WRITE filename tsl_config_write( file )
CONFIG
SYSREAD filename tsl_config_sysread( file )
CONFIG
SYSWRITE filename tsl_config_syswrite( file )
CONNECT [filename] tsl_connect(
file)
COPY filename filename tsl_copy(
file,file )
CREAD
var [,ivar [,ivar [,ivar]]] var = tsl_cread( ntim,
nchrs, n )
CREADINT
var [,ivar [,ivar [,ivar]]] var = tsl_creadint( ntim,
nchrs, n )
DDE
ADVISE ivar, svar, var var = tsl_dde_advise(
n, str )
DDE
CLOSE ivar tsl_dde_close( n )
DDE
EXECUTE ivar, svar tsl_dde_execute( n,
str )
DDE
INIT ivar, svar, svar tsl_dde_init( n,
str, str )
DDE
POKE ivar, svar, svar tsl_dde_poke( n, str,
str )
DDE
REQUEST ivar, svar, var var = tsl_dde_request( n, str
)
DDE
UNADVISE ivar, svar tsl_dde_unadvise( n,
str )
DIALOG svar tsl_dialog(
str )
DWAIT
keyword [,ivar] tsl_dwait_carrier(
str,n )
keyword = carrier,
nocarrier
DWAIT svar [, ivar] tsl_dwait(
str, n )
DWAIT ivar [, ivar] tsl_dwait(
n, n )
EXMIT
svar tsl_exmit(
str )
FLUSH tsl_flush(
)
GETPMLIST
dvar tsl_getpmlist(
dvar )
HANGUP tsl_hangup(
)
HELP [word] tsl_help(
str )
IGNORE
keyword [svar] [keyword [svar]]...
tsl_ignore(
str, str )
keyword = input,
output
RESET tsl_ignore_reset(
)
INTER tsl_inter(
)
LEARN
START filename tsl_learn_start( file )
LEARN
STOP tsl_learn_stop(
)
LEARN
PAUSE tsl_learn_pause(
)
LEARN
CONTINUE tsl_learn_continue(
)
MAPKEY
ivar, svar tsl_mapkey( n, str )
READ [svar,] var var =
tsl_read( str )
READINT [svar,] var var =
tsl_readint( str )
READN [svar,] var var =
tsl_readn( str )
SESSION
GOTO ivar [,ivar] tsl_session_goto( n, n )
SESSION
NEW [ivar] tsl_session_new( n )
SESSION
NEXT [ivar] tsl_session_next( n )
SESSION
DISCONNECT tsl_session_disconnect(
)
SETCAP
svar, svar tsl_setcap( str, str )
SETCOLOR
ivar, ivar tsl_setcolor( n, n )
SETDELAY ilit tsl_setdelay(
n )
SETSYM
ivar, svar [,ivar] tsl_setsym( n, n, n
)
TERMINAL
NOCARRIER tsl_terminal_nocarrier(
)
TERMINAL
[svar][, keyname] tsl_terminal( svar, n )
TYPE
filename tsl_type( file )
filename may
be appended by (b)
VERSION tsl_version(
)
WAIT
keyword [,ivar] tsl_wait_carrier(
str,n )
keyword = carrier,
nocarrier
WAIT svar [, ivar] tsl_wait(
str, n )
WAIT ivar [, ivar] tsl_wait(
n, n )
XMIT svar tsl_xmit(
str )
3.5 Operating System Lever Commands
CD filename tsl_cd(
file )
CHOWN
slit filename tsl_chown( str, file )
CHTYPE
slit filename tsl_chtype( str, file )
ERASE filename tsl_erase(
file )
EDIT
eolstring tsl_edit( file )
MKDIR filename tsl_mkdir(
file )
RENAME filename
filename tsl_rename(
file, file )
RMDIR filename tsl_rmdir(
file )
RUN eolstring tsl_run(
str, 0 )
RUNX
eolstring tsl_run( str, 1 )
3.6 File I/O Commands
FCLOSE ivar tsl_fclose(
n )
FCREATE ivar, svar tsl_fcreate(
n, str )
FFLUSH ivar tsl_fflush(
n )
FOPEN ivar, svar[,
svar] tsl_fopen(
n,str, str )
FREAD ivar, var
[,ivar] tsl_fread(
n, nchrs )
FREADLN ivar, var
[,ivar] tsl_freadln(
n, nchrs )
FSEEK ivar, ivar[,
ivar] tsl_fseek(
n, n, n )
FWRITE ivar, svar
[,ivar] tsl_fwrite(
n, str, nchrs )
FWRITELN ivar, svar
[,ivar] tsl_fwriteln(
n, str, nchrs )
LOG svar tsl_log(
str )
3.7 Miscellaenous Commands
DIMSTR var ivar var
= tsl_dimstr( n )
DIMINT var ivar var =
tsl_dimint( n )
DIMLOG var ivar var =
tsl_dimlog( n )
MEMLIST
[word] tsl_memlist( str )
RELEASE
var [,var]... tsl_release( var1 )
RELEASE
* tsl_release(
"*" )
SETVAR var expr var =
expr
SETVAR var _1 var =
tsl_strarg(1)
SETVAR
var $1 var = tsl_macroarg(1)
SETVAR
$1 expr tsl_setvar( tsl_strarg(1),
expr)
SETVAR
var _kermiteol var = tsi_kermiteol()
SETVAR
_kermiteol expr tsl_setvar( "_kermiteol",
expr)
SETVAR
_baud expr ERROR
SETVAR
_1 expr ERROR
3.8 Control and Flow Commands
COMMENT eolstring // str
! eolstring //
str
* eolstring //
str
DO procstring [arg]
[arg]... tsl_do(
filename_proc( arg, arg,... ))
EXECUTE
svar <
no translation >
FOR svar IN (filelist) DO tsl_forinit( "filelist" )
while
( ( svar = tsl_fornext( ) ) != "") {
ENDFOR }
IF expr if
( expr ) {
ELSEIF expr }
else if ( expr ) {
ELSE }
else {
ENDIF }
IFERROR eolstring tsl_noerror(
)
tsl_<command>
if ( tsi_errno( ) ) {
NOERROR eolstring tsl_noerror(
str )
tsl_<command>
ON
DELAY ilit file_on_delay( ) {
ON
CLOSE str file_on_close( str) {
ON
KEY keyname file_on_key_n( ) {
ON
error file_on_error(
) {
ON
abort file_on_abort(
) {
ON
carrier file_on_carrier(
) {
ON
nocarrier file_on_nocarrier(
) {
ENDON return(
tsl_endon( 3) )
ONCLOSE
procname file_onclose( str )
ONDISCONNECT
procname file_ondisconnect( str )
PROC procname file_procname(
) {
ENDPROC return(tsl_return(
0 )
REPEAT do
{
UNTIL expr }
while ( ~expr )
RETURN [ilit] return(
tsl_return( n ) )
SWITCH if
( 0) {
CASE expr }
else if ( expr ) {
DEFAULT }
else {
ENDSWITCH }
3.9 Previous Version Retrofitted Commands
ADDCR
keyword tsl_addcr( str )
ADDLF
keyword tsl_addlf( str )
keyword = on, off
BREAK
keyword tsl_break( str )
keyword = on, off
CALL word tsl_call(
str )
INIT
svar [,ivar] tsl_init( str, n )
LCHRDY
ilit tsl_lchrdy(
n )
LOWAIT
ilit tsl_lowait(
n )
LSEND
filename tsl_send(
str )
MINITEL
ivar, ivar, ivar, ivar tsl_minitel( n, n, n, n
)
PARTOPEN
svar tsl_partopen(
str )
SETKEY
keyname keyword tsl_setkey_cmd( n, str )
keyword = login,
logout, cmd, newsess, gotosess, discsess
SET
REVMAP keyword tsl_set_revmap( str )
SET
SCROLLBAR keyword tsl_set_scrollbar( str )
keyword = off, on
TERMTYPE
svar tsl_termtype(
str )
USEND
filename tsl_usend( str )
VI
filename tsl_edit( file )
3.10 TERM Script Language Funcitons
menu(
ivar, ivar ) tsf_menu( n, n )
menustat(
ivar ) tsf_menustat( n )
inigetstr(
svar, svar, svar ) tsf_inigetstr( str,
str, str )
termbits(
) tsf_termbits(
)
termkey(
ivar ) tsf_termkey( n )
sysvar(
ivar ) tsf_sysvar( n )
iscopy(
) tsf_iscopy(
)
ispaste(
ivar ) tsf_ispaste( n )
hascolor(
) tsf_hascolor(
)
keyin(
) tsf_keyin(
)
mdmstat(
) tsf_mdmstat(
)
chrdy(
) tsf_chrdy(
)
chrin(
) tsf_chrin(
)
comin(
) tsf_comin(
)
comst(
) tsf_comst(
)
isconnect(
) tsf_isconnect(
)
filedate( svar ) tsf_filedate(
str )
filemode( svar ) tsf_filemode(
str )
filesize( svar ) tsf_filesize(
str )
opsys(
) tsf_opsys(
)
opsys2(
svar ) tsf_opsys2( str )
getenv(
svar ) tsf_getenv( str )
getexe(
svar ) tsf_getexe( str )
gethomedir(
) tsf_gethomedir(
)
getpath( svar, svar ) tsf_getpath(
str, str )
getuserdir( ) tsf_getuserdir(
)
uniq(
svar ) tsf_uniq( str )
exists( svar ) tsf_exists(
str )
isdir( svar ) tsf_isdir(
str )
ftell( ivar ) tsf_ftell(
str )
feof( ivar ) tsf_feof(
n )
asc( svar ) tsf_asc(
str )
keyid(
svar ) tsf_keyid( str )
len( svar ) tsf_len(
tr )
pos( svar, svar, ivar ) tsf_pos( str,
str, n )
val( svar ) tsf_val(
str )
sum( svar, ivar, ivar ) tsf_sum( str,
n, n )
chname( ivar, ivar ) tsf_chname(
n, n )
chr( ivar ) tsf_chr(
n )
encrypt( svar ) tsf_encrypt(
str )
fconcat( svar, svar,
svar ) tsf_fconcat(
str, str, str )
fext( svar ) tsf_fext(
str )
fhead( svar ) tsf_fhead(
str )
field( svar, ivar,
svar ) tsf_field(
str, n, str )
fname( svar ) tsf_fname(
str )
keyname(
ivar ) tsf_keyname( n )
getkey(
int ) tsf_getkey(
int )
left( svar, ivar ) tsf_left(
str, n )
midstr( svar, ivar,
ivar ) tsf_midstr(
str, n, n )
right( svar, ivar ) tsf_right(
str, n )
str( ivar ) tsf_str(
n )
strconv(
svar, ivar ) tsf_strconv( str, n )
strhex( ivar, ivar ) tsf_strhex(
n, n )
tolower( svar ) tsf_tolower(
str )
toupper(svar ) tsf_toupper(
str )
trim( svar ) tsf_trim(
str )
atod( svar ) tsf_atod(
str )
time( ) tsf_time(
)
cdate( ivar ) tsf_cdate(
n )
ctime( ivar ) tsf_ctime(
n )