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

  1. **************************************************************************
  2. *                                                                        *
  3. *    This script assists you in receiving files FROM 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 "          ----- Receive Files From Macintosh Using Kermit -----"
  22.     Writeln
  23.     Writeln "Before transferring files from 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 RecFile
  53. *                                  Get the name of the file to receive.
  54. *
  55.     Writeln
  56.     Input "Enter the name of the file to be received from 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. *                                  Get the requested file(s).
  70.     Receive FileSpec "ke"
  71. *
  72.  ENDPROC   RecFile
  73. *
  74. *                                  Ask if instructions are desired.
  75.  Writeln
  76.  Input "Do you want brief instructions on setting up the Mac? " Ans
  77.  Writeln
  78. *
  79. *                                  Display help if requested.
  80.  IF ( Ans <> '' ) THEN
  81.     IF ( UpperCase( Substr( Ans, 1, 1 ) ) = 'Y' ) THEN
  82.        Call Help
  83.     ENDIF
  84.  ENDIF
  85. *                                  Set communications parameters.
  86. *
  87. *                                     No parity.
  88.  SetParam 'PA' 'N'
  89. *                                     9600 baud.
  90.  SetParam 'BA' '9600'
  91. *                                     8 data bits.
  92.  SetParam 'DA' '8'
  93. *                                     1 stop bit.
  94.  SetParam 'ST' '1'
  95. *                                     Hard-wired connection.
  96.  SetParam 'HW' '1'
  97. *                                  Ask if instructions are desired.
  98.  Writeln
  99.  Writeln "You will be prompted for the names of the files to be received."
  100.  Writeln "To stop, just hit the Enter or Return key (a blank file name)."
  101. *
  102. *                                  Loop until null file name entered.
  103.  REPEAT
  104. *
  105.     Call RecFile
  106. *                                  See if we want to send another file.
  107.  UNTIL ( 0 )
  108. *