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

  1. ***************************************************************************
  2. *       R E C M L I N K . S C R --- Script interfacing MLINK to PibTerm   *
  3. ***************************************************************************
  4. *                                                                         *
  5. *    Script:  RecMLink.Scr                                                *
  6. *                                                                         *
  7. *    Purpose: Interfaces external Megalink driver program MLINK.COM       *
  8. *             to PibTerm for receiving files.                             *
  9. *                                                                         *
  10. *    Invocation:                                                          *
  11. *                                                                         *
  12. *       Execute "RecMLink"                                                *
  13. *                                                                         *
  14. *    Remarks:                                                             *
  15. *                                                                         *
  16. *       This script is designed to be automatically invoked by the        *
  17. *       <ALT>R command when MegaLink has been defined as an external      *
  18. *       protocol at <ALT>P, F)ile transfer, k) external file transfers.   *
  19. *                                                                         *
  20. ***************************************************************************
  21. *                                                                         *
  22. *                                  Baud rate for transfer
  23.    Declare BaudRate String
  24. *                                  Comm port number
  25.    Declare Port     String
  26. *                                  Build Mlink invocation line in this
  27.    Declare MLink    String
  28. *                                  Download directory
  29.    Declare DownDir  String
  30. *                                  Length of download directory
  31.    Declare L        Integer
  32. *                                  Host mode flag
  33.    Declare HostMode String
  34. *                                  Find out if we're in host mode
  35. *
  36.    GetParam 'HP' HostMode
  37. *                                  Get download directory.
  38. *                                  If in host mode, use host mode upload
  39. *                                  directory.
  40. *
  41.    IF ( HostMode = ' ' ) THEN
  42.       GetParam 'DD' DownDir
  43.    ELSE
  44.       GetParam 'HU' DownDir
  45.    ENDIF
  46. *                                  Get port number
  47.    GetParam 'PO' Port
  48. *                                  Get baud rate
  49.    GetParam 'BA' BaudRate
  50. *                                  Strip final '\' if any from download dir
  51.    Set L = LENGTH( DownDir )
  52. *
  53.    IF ( Substr( DownDir, L, 1 ) = '\' ) THEN
  54.       Set DownDir = Substr( DownDir, 1, L - 1 )
  55.    ENDIF
  56. *                                  Build Mlink invocation line
  57. *
  58.    Set MLink = CONCAT( 'Mlink port ' , Port )
  59.    Set MLink = CONCAT( CONCAT( MLink , ' speed ' ), BaudRate )
  60.    Set MLink = CONCAT( CONCAT( MLink , ' rm ') , DownDir )
  61. *
  62. *                                  Echo MLink line to screen
  63.    Writeln " "
  64.    Writeln "Invoking MLink as follows:"
  65.    Writeln MLink
  66.    Writeln " "
  67. *                                  Echo MLink line to capture file
  68. *
  69.    Writelog "Invoking MLink as follows:"
  70.    Writelog MLink
  71. *                                  Call MLink
  72.    Dos MLink
  73. *