home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Aktief 1995 #3 / CDA3.iso / comm / ace186b.zip / MINIHOST.SCR < prev    next >
Text File  |  1994-04-07  |  12KB  |  355 lines

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;
  3. ;;          --  Mini Host Mode Script for AceComm v1.86  --
  4. ;;
  5. ;;  Note:  Labels are CaSe sensitive
  6. ;;         :@@Start    will not be found if accessed as <goto>@@start
  7. ;;                                                          => S <=
  8. ;;         Labels begin with ':' character, and start at the beginning
  9. ;;         of a line
  10. ;;         Each label must be a unique character string
  11. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  12. ;
  13. ;         Back up here after caller
  14. ;
  15. ;;;;;;;;;;
  16. :@@Start
  17. ;;;;;;;;;;
  18.  
  19. <HostEcho>OFF <SendStr>ATE0^M       ; We do not want the modem to echo
  20.                     ; as AceComm handles this when we turn
  21.                     ; <Host_Echo>ON
  22. <AutoAnswer>On
  23.  
  24.    <LocalKeys>Off
  25.    <SetDTR>Off <Delay>1 <SetDTR>On  ; This will hang up most modems
  26.    <SetLCtrl>8n1                    ; new macro for 1.85
  27.    <Delay>2                         ; This will help wait for modem response
  28.                     ; strings to clear
  29.  
  30.    <DispText>TellAutoAnswer         ; Display text defined in Data Area
  31.                     ; %P (port), %B (connect speed)
  32.    <DispStr>Port %P Setup for %B^M^JWaiting for caller^M^J
  33. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  34. ;
  35. ; Top of wait for caller loop
  36. ;
  37. ;;;;;;;;;;
  38. :@@Wait
  39. ;;;;;;;;;;
  40.    <DispStr>^M[CURTIME]^M
  41.  
  42.    <GetDCD> <if>1 <goto>@@DCDLogIn  ; Here is where we detect a caller
  43.    <GetKey>5 <if>L <goto>@@LogIn   ; Allow local keyboard login
  44.         <if>C <DOSShell_>
  45.         <if>ALT+J <DOSShell_>
  46.         <if>R <RunProg>list.com
  47.         <if>E <goto>@@END       ; Provide a clean exit
  48.    <goto>@@Wait                     ; 'Wait' is a case sensitive label...
  49. ;
  50. ; Here if carrier detected
  51. ;
  52. :@@DCDLogIn
  53. ;
  54. ; Clear screen,  Send ansi video request,  Display banner
  55. ;
  56.    <Var0>0                          ; See if we can set this to 1 with
  57.                     ; our ansi video detection scheme.
  58.    <Timer0>3                        ; Init Timer0 and set 3 second timeout
  59.    <RawCapture>On                   ; Allow all caller's input in wait buffer
  60.                     ; ESC[6n  is video request (detect ansi)
  61.    <SendStr>^L^[[6n^MMini Host Script for AceComm v1.86^M
  62. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  63. ;
  64. ; Loop here for 3 second maximum waiting for answer to Ansi detect sequence
  65. ;
  66. :@@DetectAnsi
  67.    <CheckMdm> <if>1 <goto>@@AnsiDetected     ; Remote will answer with
  68.    <Timer0> <if>1 <goto>@@DetectAnsi           ; ESC[n;nR  if ANSI capable
  69.    <RawCapture>Off
  70.    <HostEcho>ON                                ; HostEcho translates CR
  71.                            ; into CR,LF pair
  72.    <DispStr>^M^JAnsi video request un-answered ; Ansi video request
  73.    <goto>@@Welcome
  74. :@@AnsiDetected
  75.    <Var0>1
  76.    <RawCapture>Off
  77.    <HostEcho>ON                     ; HostEcho translated CR into CR,LF pair
  78.    <SendStr> ^M^JAnsi video detected!
  79.  
  80. :@@Welcome
  81.    <Var0> <if>1 <DispStr>^M^J[Whi]Connected at [Blink][Bold][Red]%C[AttrOff]
  82.    <Var0> <if>0 <DispStr>^M^JConnected at  %C
  83.  
  84. ;
  85. ; Caller names are pre registered into an ascii comment file "USERLIST.LST"
  86. ; Sample Line:  Michael Phelps,acecomm,9
  87. ; where "acecomm" is the password
  88. ;
  89. ;;;;;;;;;;;
  90. :@@LogIn
  91. ;;;;;;;;;;;
  92.    <Var0> <if>1 <DispStr>[Whi]
  93.    <DispStr> ^M^JEnter your first and last name:
  94.    <GetStr>26 <FindUser> <if>1 <goto>@@GetPwd
  95.    <DispStr>^M^J%FN not found!
  96.  
  97.    <DispStr> ^M^JEnter your first and last name:
  98.    <GetStr>26 <FindUser> <if>1 <goto>@@GetPwd
  99.    <DispStr>^M^J%FN not found!
  100.  
  101.    <DispStr> ^M^JEnter your first and last name:
  102.    <GetStr>26 <FindUser> <if>1 <goto>@@GetPwd
  103.  
  104.    <DispStr>^L^M^JYour name has not been registered in the user file, you may
  105.    <DispStr>^M^Joptionaly leave a short not for the SysOp, pleas include your
  106.    <DispStr>^M^Jfirst and last name along with a password.
  107.    <DispStr>^M^J^M^JWould you like to leave a note? (Y)es/(N)o
  108. :@@1
  109.    <GetKey>60
  110.    <if>Y <goto>@@LogOffComment
  111.    <if>N <goto>@@OFF
  112.    <Goto>@@1
  113. :@@GetPwd
  114.    <DispStr> ^M^JEnter password:
  115.    <GetStr>26 <UserPwd> <if>1 <goto>@@MainMenu
  116.    <DispStr> ^M^JEnter password:
  117.    <GetStr>26 <UserPwd> <if>1 <goto>@@MainMenu
  118.    <DispStr> ^M^JEnter password:
  119.    <GetStr>26 <UserPwd> <if>0 <goto>@@OFF
  120.                   <goto>@@MainMenu
  121. :@@LogOffComment
  122.    <HostEcho>ON                     ; This needs be on for message, even local
  123.    <GetMsg> <Goto>@@OFF
  124. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  125. ;
  126. ; Top of main menu loop
  127. ;
  128. :@@MainMenu
  129.    <DispStr>^L
  130.    <Var0> <if>1 <DispStr>[Bblu][Whi][Bold][Cle]
  131.    <DispStr>                 --  AceComm Mini Host Script for AceComm v1.86 --
  132.    <Var0> <if>1 <DispStr>[AttrOff]
  133.    <DispStr>^M^J^M^J
  134.  
  135.    <Var0> <if>1 <DispText>AnsiMainMenu
  136.    <Var0> <if>0 <DispText>MainMenu
  137.  
  138. :@@MainMenuKey
  139.    <GetKey>60                       ; <GetKey> times out every n seconds
  140.    <if>1 <goto>@@BBS                ; so if the caller drops carrier, we
  141.    <if>C <goto>@@Comment            ; can fall through to the carrier check
  142.    <if>Y <goto>@@YourMail           ; below. Default timeout is 60 if param.
  143.    <if>R <goto>@@ReadMail
  144.    <if>F <goto>@@Files
  145.    <if>G <goto>@@OFF
  146.    <if>^M <goto>@@MainMenu          ; ^M for <CR>
  147.  
  148.    ; Note: any invalid key press while off line,
  149.    ;       results in '<goto>'@@Start
  150.    <GetDCD> <if>0 <goto>@@NoDCD     ; Detect if caller hung up
  151.    <goto>@@MainMenuKey              ; Wait for a key press we can process
  152.  
  153. :@@BBS
  154.    <ChgDir>BBS <RunProg>BBS %P %C <ChgDir>[DIR_START]
  155.    <goto>@@MainMenu
  156. :@@Comment
  157.    <HostEcho>ON                     ; This needs be on for message, even local
  158.    <GetMsg> <Goto>@@MainMenu
  159. :@@YourMail
  160.    <HostEcho>ON                     ; This needs be on for message, even local
  161.    <YourMsg> <Goto>@@MainMenu
  162. :@@ReadMail
  163.    <HostEcho>ON                     ; This needs be on for message, even local
  164.    <ReadMsg> <Goto>@@MainMenu
  165. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  166. ; Files Menu
  167. ;
  168. :@@Files
  169.    <DispStr>^M^L^M
  170.    <Var0> <if>1 <DispStr>[BWhi][Blu]
  171.    <DispStr>^M^J  ┌────────────────────────────────┐
  172.    <DispStr>^M^J  │ (Z)modem  AceComm version 1.86 │
  173.    <DispStr>^M^J  │ (D)ownload file                │
  174.    <DispStr>^M^J  │ (U)load file                   │
  175.    <DispStr>^M^J  │ (L)ist file titles             │
  176.    <DispStr>^M^J  │ (R)aw directory list           │
  177.    <DispStr>^M^J  │ (M)ain menu                    │
  178.    <DispStr>^M^J  │ (G)ood bye                     │
  179.    <DispStr>^M^J  └────────────────────────────────┘
  180.    <Var0> <if>1 <DispStr>[AttrOff]
  181.    <DispStr>^M^J^M^JSelect:
  182.  
  183. :@@FilesKey
  184.    <GetKey>60
  185.    <if>Z <goto>@@DownloadAceComm
  186.    <if>D <goto>@@DownloadFile
  187.    <if>U <goto>@@UploadFile
  188.    <if>L <goto>@@ListFiles
  189.    <if>R <goto>@@RawDir
  190.    <if>M <goto>@@MainMenu
  191.    <if>G <goto>@@OFF
  192.    <if>^M <goto>@@Files
  193.    <GetDCD> <if>0 <goto>@@NoDCD     ; Detect if caller hung up
  194.    <goto>@@FilesKey
  195.  
  196. :@@DownloadAceComm
  197.    <SendZmo@>@ACECOMM.LST
  198.    <goto>@@Files
  199. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  200. ; Provide Download Options
  201. ;
  202. :@@DownloadFile
  203.    <ChgDir>[DIR_DNLDS]              ; So files displayed with
  204.                     ; <DirList>[DIR_DNLDS]\*.* can be found
  205.    <DispStr> ^M^JEnter filename: <GetStr>15 <DispStr>^M
  206. :@@ChooseDnProtocol
  207.    <DispStr>^M^JZ)modem
  208.    <DispStr>^M^JY)modem  / Ymodem G
  209.    <DispStr>^M^JX)modem
  210.    <GetKey>60
  211.    <if>Z <goto>@@ZmodemSend
  212.    <if>Y <goto>@@YmodemSend
  213.    <if>X <goto>@@XmodemSend
  214.    <if>^M <goto>@@RetFiles
  215.  
  216.    <GetDCD> <if>0 <goto>@@NoDCD     ; Detect if caller hung up
  217.    <goto>@@ChooseDnProtocol
  218.  
  219. :@@ZmodemSend
  220.    <SendZmo>%FN
  221.    <ChgDir>[DIR_START] <goto>@@Files
  222. :@@YmodemSend
  223.    <SendYmo1K>%FN
  224. :@@RetFiles
  225.    <ChgDir>[DIR_START] <goto>@@Files
  226. :@@XmodemSend
  227.    <SendXmo>%FN
  228.    <ChgDir>[DIR_START] <goto>@@Files
  229. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  230. ; Provide Upload Options
  231. ;
  232. :@@UploadFile
  233. :@@ChooseUpProtocol
  234.    <DispStr>^M^JZ)modem
  235.    <DispStr>^M^JG)Ymodem G
  236.    <DispStr>^M^JY)modem
  237.    <DispStr>^M^JX)modem
  238.    <GetKey>60
  239.    <if>Z <goto>@@ZmodemRecv
  240.    <