home *** CD-ROM | disk | FTP | other *** search
- ***************************************************************************
- * R E C M L I N K . S C R --- Script interfacing MLINK to PibTerm *
- ***************************************************************************
- * *
- * Script: RecMLink.Scr *
- * *
- * Purpose: Interfaces external Megalink driver program MLINK.COM *
- * to PibTerm for receiving files. *
- * *
- * Invocation: *
- * *
- * Execute "RecMLink" *
- * *
- * Remarks: *
- * *
- * This script is designed to be automatically invoked by the *
- * <ALT>R command when MegaLink has been defined as an external *
- * protocol at <ALT>P, F)ile transfer, k) external file transfers. *
- * *
- ***************************************************************************
- * *
- * Baud rate for transfer
- Declare BaudRate String
- * Comm port number
- Declare Port String
- * Build Mlink invocation line in this
- Declare MLink String
- * Download directory
- Declare DownDir String
- * Length of download directory
- Declare L Integer
- * Host mode flag
- Declare HostMode String
- * Find out if we're in host mode
- *
- GetParam 'HP' HostMode
- * Get download directory.
- * If in host mode, use host mode upload
- * directory.
- *
- IF ( HostMode = ' ' ) THEN
- GetParam 'DD' DownDir
- ELSE
- GetParam 'HU' DownDir
- ENDIF
- * Get port number
- GetParam 'PO' Port
- * Get baud rate
- GetParam 'BA' BaudRate
- * Strip final '\' if any from download dir
- Set L = LENGTH( DownDir )
- *
- IF ( Substr( DownDir, L, 1 ) = '\' ) THEN
- Set DownDir = Substr( DownDir, 1, L - 1 )
- ENDIF
- * Build Mlink invocation line
- *
- Set MLink = CONCAT( 'Mlink port ' , Port )
- Set MLink = CONCAT( CONCAT( MLink , ' speed ' ), BaudRate )
- Set MLink = CONCAT( CONCAT( MLink , ' rm ') , DownDir )
- *
- * Echo MLink line to screen
- Writeln " "
- Writeln "Invoking MLink as follows:"
- Writeln MLink
- Writeln " "
- * Echo MLink line to capture file
- *
- Writelog "Invoking MLink as follows:"
- Writelog MLink
- * Call MLink
- Dos MLink
- *