home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
TE2HOST.ZIP
/
TE2HOST.SCR
< prev
next >
Wrap
Text File
|
1990-12-28
|
3KB
|
105 lines
;; --------------------------------------------------------------------------
;;
;; TE2Host.scr -- Host mode script suite for TE/2
;; Copyright 1990, Oberon Software, All rights reserved
;;
;; --------------------------------------------------------------------------
;; --------------------------
;; Some global configuration:
global integer maximumBaud = 2400 ;; Maximum supported baud rate
global string HomePath = "d:/te2/host" ;; path for config files
global string PublicPath = "d:/te2/host/public" ;; path for downloadable files
global string HostULPath = "d:/te2/host/ul" ;; path for user uploads
;; -----------------------------------
;; Inter-file communication variables:
global integer MenuLevel ;; Current Menu State
global integer XFerType ;; File transfer type
global integer smMenuExit ;; Local sysop menu result
;; ----------------------------------------
;; Menu Configuration Variable (Constants):
global integer MLevelMain = 0
global integer MLevelFile = 1
global integer MLevelMail = 2
global integer MLevelProto = 98
global integer MLevelSysop = 99
global integer XFerUpLoad = 0
global integer XFerDownLoad = 1
;; -----------------------------------------------------------------------
;; Colors, these are modified in subroutine SetTerminal (in HostMode.scr):
global string DfltAttr = "^[[36;0m"
global string BoldOn = "^[[33;1m"
global string BoldOff = "^[[36;0m"
global string WarnOn = "^[[37;1m"
global string WarnOff = "^[[36;0m"
;; --------------------------------------------------------------------------
;; ---- Local variables:
string OrigPath ;; buffer for original path
string OrigScrPath ;; buffer for original script path
string OrigDLPath ;; buffer for original download path
string myModemInit = "ATE0 V1 X6 ^M" ;; modem init string
integer stdParity = 0
integer stdWordLen = 8
integer stdStopBits = 0
;; ------------------------------------------------------------------------
;; Perform all initialization for the environment and terminal settings
;; as well as for the modem here. This is called each time before
;; (re)entering call wait mode.
subroutine SetModemParms
termecho(FALSE)
localecho(FALSE)
ChDisk(HomePath)
ChDir(HomePath)
setparms(-1, maximumBaud, stdParity, stdWordLen, stdStopBits)
transmit("%s", myModemInit)
sleep(2500)
endsub
;; --------------------------------------------------------------------------
;; --------------------------------------------------------------------------
program
OrigPath = curdir
OrigScrPath = scriptPath
OrigDLPath = downloadPath
downloadPath = HostULPath
scriptPath = OrigScrPath + "/host"
do
cls()
message("TE/2 Host Script^M^J")
gosub SetModemParms
message("Waiting for call...^M^J")
run("wait4Cal")
if connected
run("hostmode")
else
break
endif
loop
message("^M^JTE/2 Host Script ended.^M^J")
ChDisk(OrigPath)
ChDir(OrigPath)
scriptPath = OrigScrPath
downloadPath = OrigDLPath
termecho(TRUE)
end