home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / COMM / MISC / BGFT211.ZIP / BGFTDYTL.SLT < prev    next >
Encoding:
Text File  |  1991-05-02  |  4.5 KB  |  93 lines

  1. // BGFTDYTL.SLT: Telix script for BGFT Ymodem Batch download.
  2. // Support Package for Registered Users of BGFT (TM).
  3. // Copyright 1990-1991 Dirac Systems.
  4. // Telix is a trademark of Exis Inc.
  5.  
  6. // MANUAL INSTALLATION:
  7. // The following outlines how to install the script for use as an
  8. //      external protocol in Telix:
  9. // Be sure that the resident part (BGFT360K.COM or BGFT720K.COM) of
  10. //      BGFT is loaded before the communications program. Add /B if
  11. //      you want Drive B:. The BGFT status window does not need to be
  12. //      active; it need only be resident.
  13. // The batch file BGFTINIT.BAT is used to initialize BGFT prior to
  14. //      running Telix. This file must be edited to contain information
  15. //      about your modem's port number and baud rate prior to use
  16. //      (default is 1200 baud, port 1). You must run the batch file
  17. //      BGFTINIT.BAT to make sure that BGFT is set up properly. THIS
  18. //      MUST BE DONE before using BGFT as an external protocol under
  19. //      Telix. This is true even though the baud and port are set here.
  20. // Put the right sized floppy (.720, 1.2, or 1.44 Megabyte DOS
  21. //      formatted, no errors for BGFT720K.COM ; the above or 360K DOS
  22. //      formatted, no errors for BGFT360K.COM) into the desired floppy
  23. //      drive. The floppy size must correspond to the drive type.
  24. // Compile the BGFTDYTL.SLT by using the Telix compiler, CS, viz.
  25. //      CS BGFTDYTL
  26. //      This will produce BGFTDYTL.SLC for use in Telix.
  27. // From terminal mode do 'Alt_O' for 'Configure Telix'.
  28. // Choose 'Protocol Options'.
  29. // 'Change which setting?': Choose one of the four external protocol
  30. //      options: A, B, C, or D.
  31. // Key: When in the download operation, pressing this key will choose
  32. //      the protocol. The key should not be used elsewhere, eg. X (Xmodem).
  33. //      Choose 'F', for example. It will be highlighted for the Telix
  34. //      download operation.
  35. // Protocol name: This is what will show up in the list of protocols when
  36. //      you choose the download operation. Call it, 'BGFTYmdm'.
  37. // Upload file name: For this example, leave it blank.
  38. // Download file name: Enter, BGFTDYTL. This will be the compiled script.
  39. // BAT or Script: Choose 'Script' since BGFTDYTL.SLT is a script.
  40. // DL name: Choose 'N' for no since the Ymodem Batch protocol provides the
  41. //      correct filenames.
  42. // ESC out of the screen and save the set up to disk by hitting 'W'. This
  43. //      get you back into Telix terminal mode.
  44. // Download as you normally would (PgDn); tell the host to send via Ymodem
  45. //      Batch.
  46. // Choose the BGFTYmdm protocol using arrows plus an ENTER or by the Key
  47. //      defined above.
  48. // The script will give some messages, start the background transfer, and
  49. //      exit Telix. You will be at the DOS prompt.
  50. // You should see the BGFT window indicate normal transmission.
  51. // Now you can do your work in foreground as the file is downloaded in
  52. //      background.
  53. // After completion you can use BGFT.EXE to move your files to some DOS
  54. //      directory. The files are ready to use.
  55. // Use BGFTOPT /3<Pathname> to dump downloaded files from the file buffer
  56. //      to a specified directory.
  57. //
  58.  
  59.  
  60. str command[80];                // Command string for BGFTOPT.
  61. str temp[80];                   // Temporary concatenation string.
  62.  
  63. // The command we will issue to DOS is:
  64. //              BGFTOPT /q /a /r# /b# /~2 /s
  65. //    where:
  66. //      /q    - quiet mode (don't printout results)
  67. //      /a    - acknowledge any error that may be present
  68. //      /r#    - select port # (eg. /r1)
  69. //        /b#   - select baud # (eg. /b2400)
  70. //        /~2   - select protocol 2 (Ymodem Batch download)
  71. //      /s    - start the transfer
  72.  
  73. main()
  74. {
  75. command = "/q";                         // Start command line.
  76. strcat(command," /a");                  // Acknowledge any error.
  77. strcat(command," /r");
  78. itos(get_port(),temp);                  // Find out where we are connected.
  79. strcat(command,temp);                   // Reconnect existing comm port.
  80. strcat(command," /b");
  81. itos(get_baud(),temp);                  // Find out what is the baud rate.
  82. strcat(command,temp);                   // Set baud rate for resident.
  83. //
  84. //      Ymodem Batch Download
  85. //
  86. strcat(command," /~2");                 // This protocol is Ymodem Batch dnld.
  87. strcat(command," /s");                  // Start to send file.
  88. prints(command);                        // Tell user the command string.
  89. run("bgftopt.exe",command,2);
  90. exittelix(0,0);                         // Leave Telix; don't hangup line.
  91. }                                       // Now enjoy background Ymodem Batch dnld.
  92.  
  93.