home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / kermit / tskerm24.arc / PHONE.CLL < prev    next >
Encoding:
Text File  |  1989-12-24  |  4.0 KB  |  142 lines

  1. ;
  2. ; PHONE.CLL How to prepare and use a dialing directory
  3. ; by Timo Salmi Sun 24-Dec-1989
  4. ;
  5. ; Gives the outlines only. You must customize this script.
  6. ; You must have a Hayes compatible modem
  7. ;
  8. ; The script is called by the Kermit command "take phone.cll"
  9. ; You can interreupt the scipt by CTRL/C. If you do that this it
  10. ; is highly advisable to write "release" before continuing!
  11. ; It is also advisable to include your kermit directory in your path
  12.  
  13. define release define \%1,define \%c,define \%n,define \%b,define \%y,define \%p,define \%s
  14.  
  15. :_get_choice
  16. if not defined \%1 goto _directory
  17. goto _check_choice
  18.  
  19. :_directory
  20. echo \13   System                   Phone      Baud\13
  21. echo 1) Micro Maniacs Opus       425966     9600\13
  22. echo 2) Mikro PC                 143227     1200\13
  23. echo 3) Mykki                    481277     2400\13
  24. echo 4) Server                   455xxxx    4800\13
  25. echo 5) Casino Opus              466867     9600\13
  26. echo 6) New Country Road         608666     4800\13
  27. echo Q) Quit now
  28. ask \%1 Select:
  29. if not defined \%1 goto _get_choice
  30.  
  31. :_check_choice
  32. define \%c \%1
  33. if equal \%c 1 goto _label1
  34. if equal \%c 2 goto _label2
  35. if equal \%c 3 goto _label3
  36. if equal \%c 4 goto _label4
  37. if equal \%c 5 goto _label5
  38. if equal \%c 6 goto _label6
  39. if equal \%c q goto _quit
  40. echo Invalid choice\13
  41. release
  42. goto _get_choice
  43.  
  44. :_label1
  45. define \%s Micro Maniacs Opus 2:515/1
  46. define \%n 425966
  47. define \%b 9600
  48. define \%p xxxxxxx           ;Put your password here
  49. take 9600e.cmd               ;Not provided, put your own modem inits here
  50. take ansi.cmd
  51. goto _make_call
  52. ;
  53. :_label2
  54. define \%s Mikro PC Opus
  55. define \%n 143227
  56. define \%b 1200
  57. define \%p xxxxxxx           ;Inovoke password using alt-1
  58. take 1200.cmd                ;Put your own modem initializations here
  59. take ansi.cmd                ;To use ansi terminal emulation
  60. goto _make_call
  61. ;
  62. :_label3
  63. define \%s Mykki Opus
  64. define \%n 481277
  65. define \%b 2400
  66. define \%p xxxxxxx
  67. take 2400.cmd                ;Put your own modem inits here
  68. take ansi.cmd
  69. goto _make_call
  70. ;
  71. :_label4
  72. define \%s Opmvax server
  73. define \%n 455xxxx
  74. define \%b 4800
  75. define \%p xxxxxxx
  76. take 4800e.cmd               ;Put your own modem inits here
  77. take msk232zn.ini            ;To undo possible ansi
  78. echo \13msk232zn.ini laptop keyboard definitions ready\13
  79. take memacszn.cmd            ;A Unix system
  80. goto _make_call
  81. ;
  82. :_label5
  83. define \%s Casino Opus
  84. define \%n 466867
  85. define \%b 9600
  86. define \%p xxxxxxx
  87. take 9600e.cmd
  88. take ansi.cmd
  89. goto _make_call
  90. ;
  91. :_label6
  92. define \%s New Country Road
  93. define \%n 608666
  94. define \%b 4800
  95. define \%p xxxxxxx
  96. take 4800e.cmd
  97. take ansi.cmd
  98. goto _make_call
  99.  
  100. echo Error: Incomplete script \7\13
  101.  
  102. :_quit
  103. release
  104. hangup
  105. stop
  106.  
  107. :_make_call
  108. set key \2424 \%p\13       ;Password by alt-1
  109. echo Calling \%s \%n at \%b bauds\13\10
  110. pause 1
  111.  
  112. set baud \%b               ;Set the appropriate speed
  113. set count 3                ;Set the counter (substitute 3 with your choice)
  114.  
  115. :_try_again                ;Label for returning
  116. pause 4                    ;Let it get ready
  117. output at\13               ;Wake up the modem
  118. pause 1
  119. output atdt\%n\13          ;Call the phone number
  120. input  5 busy              ;Is the line busy (timing is important here)
  121. if not failure goto _try_again
  122. input 35 connect \%b       ;Wait for a connection (you may decrease the time)
  123. if failure goto _nocnect   ;Just what it says
  124. goto _cnect                ;To making the connection
  125.  
  126. :_nocnect                  ;Subroutine for no connection
  127. if count goto _try_again   ;Try again until count is exhausted
  128. echo Maximum number of attempts exceeded\13
  129. hangup                     ;Just to make sure
  130. release                    ;Release the parameters (else the values remain)
  131.  
  132. :_query                    ;Want to select another call?
  133. ask \%y Select again (y/n)?
  134. if not defined \%y goto _query
  135. if equal \%y y goto _get_choice
  136. if not equal \%y n goto _query
  137. stop
  138.  
  139. :_cnect                    ;We've made it!
  140. release                    ;Release the parameters
  141. connect
  142.