home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / pibterm / pibt41e3.zip / TOMAC.SCR < prev    next >
Text File  |  1988-02-26  |  4KB  |  109 lines

  1. **************************************************************************
  2. *                                                                        *
  3. *    This script assists you in sending files TO a Macintosh             *
  4. *    using Kermit.                                                       *
  5. *                                                                        *
  6. **************************************************************************
  7. *
  8. *                                  File specification for files to transfer
  9.  Declare FileSpec String
  10. *                                  General string for holding replies
  11.  Declare Ans      String
  12. *
  13.  PROCEDURE Help
  14. *                                  Holds bogus input character
  15.     Declare Ch String
  16. *                                  Clear the screen
  17.     Clear
  18. *                                  Write introductory note about setting
  19. *                                  up Kermit on the Mac.
  20. *
  21.     Writeln "          ----- Send Files To Macintosh Using Kermit -----"
  22.     Writeln
  23.     Writeln "Before transferring files to the Macintosh, make sure to do"
  24.     Writeln "the following:"
  25.     Writeln
  26.     Writeln "   (1)   Make sure you have connected the serial ports of"
  27.     Writeln "         the PC and Macintosh together correctly."
  28.     Writeln
  29.     Writeln "   (2)   Start up MacKermit on the Macintosh.  Set its"
  30.     Writeln "         communications settings to:"
  31.     Writeln
  32.     Writeln "            9600 baud"
  33.     Writeln "            No parity"
  34.     Writeln
  35.     Writeln "   (3)   Place MacKermit in server mode."
  36.     Writeln
  37.     Input "Strike the Return or Enter key to continue." Ch
  38.     Writeln
  39. *
  40.  ENDPROC   Help
  41. *
  42.  PROCEDURE FinServe
  43. *                                  Issue FINISH to remote server.
  44.     Writeln
  45.     Writeln  "Finishing MacKermit server ..."
  46.     Writeln
  47. *
  48.     Send "/finish" "ke"
  49. *
  50.  ENDPROC   FinServe
  51. *
  52.  PROCEDURE SendFile
  53. *                                  Get the name of the file to send.
  54. *
  55.     Writeln
  56.     Input "Enter the name of the file to be sent to the Mac: " FileSpec
  57. *
  58. *                                  Null file spec -- quit.
  59. *
  60.     FileSpec = TRIM( LTRIM( FileSpec ) )
  61. *
  62.     IF ( FileSpec = '' ) THEN
  63.        Writeln
  64.        Writeln "No file name entered, quitting."
  65.        Writeln
  66.        Call FinServe
  67.        Exit
  68.     ENDIF
  69. *                                  Send the requested file(s).
  70.     Send FileSpec "ke"
  71. *
  72.  ENDPROC   SendFile
  73. *
  74. *                                  Ask if instructions are desired.
  75. *
  76.  Writeln
  77.  Input "Do you want brief instructions on setting up the Mac? " Ans
  78.  Writeln
  79. *
  80. *                                  Display help if requested.
  81.  IF ( Ans <> '' ) THEN
  82.     IF ( UpperCase( Substr( Ans, 1, 1 ) ) = 'Y' ) THEN
  83.        Call Help
  84.     ENDIF
  85.  ENDIF
  86. *                                  Set communications parameters.
  87. *
  88. *                                     No parity.
  89.  SetParam 'PA' 'N'
  90. *                                     9600 baud.
  91.  SetParam 'BA' '9600'
  92. *                                     8 data bits.
  93.  SetParam 'DA' '8'
  94. *                                     1 stop bit.
  95.  SetParam 'ST' '1'
  96. *                                     Hard-wired connection.
  97.  SetParam 'HW' '1'
  98. *                                  Display brief instructions.
  99.  Writeln
  100.  Writeln "You will be prompted for the names of the files to be sent."
  101.  Writeln "To stop, just hit the Enter or Return key (a blank file name)."
  102. *
  103. *                                  Loop until null file name entered.
  104.  REPEAT
  105. *
  106.     Call SendFile
  107. *                                  See if we want to send another file.
  108.  UNTIL ( 0 )
  109. *