home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
comm1
/
tm211-3.lzh
/
TMSCRIPT.DOC
< prev
Wrap
Text File
|
1990-05-25
|
143KB
|
4,259 lines
▌███████████ ▌█████████▌ ▌██████ ▌█ ▌█
▌█▌ ▌█▌ ▌█▌ ▌█▌ ▌█▌ ▌█
▌█▌ ▌█▌ ▌█▌ ▌█▌ ▌█▌ ▌████▌ ▌████ ▌█ ▌██████ ▌█████
▌█▌ ▌█▌ ▌█▌ ▌█▌ ▌██████ ▌█ ▌█ ▌█ ▌█ ▌█ ▌█
▌█▌ ▌█▌ ▌█▌ ▌█▌ ▌█ ▌█ ▌█ ▌█ ▌█ ▌█ ▌█
▌█▌ ▌█▌ ▌█▌ ▌█▌ ▌█ ▌█ ▌█ ▌█ ▌█ ▌█ ▌█
▌█▌ ▌█▌ ▌█▌ ▌█▌ ▌██████ ▌████▌ ▌█ ▌█ ▌██████ ▌███
▌█
▌█
▌█
Telemate Script Language
Version 2.1
By Tsung Hu
Copyright (c) 1988-1990 Tsung Hu. All rights reserved.
TELEMATE SCRIPT TABLE OF CONTENTS i
TABLE OF CONTENTS
INTRODUCTION 1
Using TMS.EXE, the Script Compiler . . . . . . . . . . . . . . 1
To Run a Script . . . . . . . . . . . . . . . . . . . . . . . . 1
Hello, world . . . . . . . . . . . . . . . . . . . . . . . . . 2
DATA TYPES 3
Integer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
String . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Character . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Boolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
VARIABLES 5
Variable Identifiers. . . . . . . . . . . . . . . . . . . . . . 5
Variable Declarations . . . . . . . . . . . . . . . . . . . . . 5
Predefined Variables. . . . . . . . . . . . . . . . . . . . . . 5
CONNECTED . . . . . . . . . . . . . . . . . . . . . . . . . 5
FOUND . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
SUCCESS . . . . . . . . . . . . . . . . . . . . . . . . . . 6
LOGGING . . . . . . . . . . . . . . . . . . . . . . . . . . 7
WIDTH . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
HEIGHT . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
EXPRESSIONS 8
Rule Of Precedence . . . . . . . . . . . . . . . . . . . . . . 8
Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . 8
Boolean Operators . . . . . . . . . . . . . . . . . . . . . . . 8
Relational Operators . . . . . . . . . . . . . . . . . . . . . 9
STATEMENTS 10
Comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Assignment Statement . . . . . . . . . . . . . . . . . . . . . 10
If Statement . . . . . . . . . . . . . . . . . . . . . . . . . 10
Switch Statement . . . . . . . . . . . . . . . . . . . . . . . 11
While Loop . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Repeat Loop . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Exit Statement . . . . . . . . . . . . . . . . . . . . . . . . 13
#include Directive . . . . . . . . . . . . . . . . . . . . . . 14
PROCEDURES 15
Procedure Declaration . . . . . . . . . . . . . . . . . . . . . 15
Parameter Declaration . . . . . . . . . . . . . . . . . . . . . 16
Calling Procedure and Parameter Passing . . . . . . . . . . . . 18
Nested Procedures and Scope of Variables . . . . . . . . . . . 18
Return Statement . . . . . . . . . . . . . . . . . . . . . . . 18
TELEMATE SCRIPT TABLE OF CONTENTS ii
BUILT IN PROCEDURES BY CATEGORY 20
Console I/O . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Print Statement . . . . . . . . . . . . . . . . . . . . . . 20
COM I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Put Statement . . . . . . . . . . . . . . . . . . . . . . . 21
Waitfor Statement . . . . . . . . . . . . . . . . . . . . . 21
File Handling . . . . . . . . . . . . . . . . . . . . . . . . 22
String Handling . . . . . . . . . . . . . . . . . . . . . . . . 22
Miscellaneous Routines . . . . . . . . . . . . . . . . . . . . 22
BUILT IN PROCEDURES 23
Append . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Alarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
At . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Atoi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
ChDir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Clear COM . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Clear Key . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Clear Text . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
ComInCount . . . . . . . . . . . . . . . . . . . . . . . . . . 26
ComOutCount . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Concat . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Create . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Dial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Dos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
ExitTelemate . . . . . . . . . . . . . . . . . . . . . . . . . 30
FileExist . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
FileSize . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
GetCh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
HangUp . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
InputCh . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Itoa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
LoadFon . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
LogOff . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
LogOn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
LogPause . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
LogResume . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Put . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
ReadCh . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Receive . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Rename . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
TELEMATE SCRIPT TABLE OF CONTENTS iii
Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Seek . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
StrDel . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
StrIns . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
StrPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47