home *** CD-ROM | disk | FTP | other *** search
/ 1st Canadian Shareware Disc / 1st_Canadian_Shareware_Disc_1991.ISO / comms / bbsname / bbs.doc next >
Text File  |  1988-12-15  |  4KB  |  125 lines

  1.             *********************************
  2.             *                *
  3.             *  BBS : A script to write the  *
  4.             *  name of the BBS system into  *
  5.             *  the bottom-line status bar   *
  6.             *  of TELIX 3.10 and later      *
  7.             *       -----------------       *
  8.             *     W. H. Fisher: Dec 1988    *
  9.             *                *
  10.             *********************************
  11.  
  12.  
  13.     This is a simple-minded script that may either be directly
  14.     executed while in TELIX (you may assign the script to one
  15.     of the "Hot Keys" via the Alt-K procedure in TELIX), or it
  16.     may be called by one of the "Logon scripts" such as "OPUS.SLT"
  17.     or "PCBOARD.SLT".
  18.  
  19.     To assign BBS to a hot-key:
  20.     ---------------------------
  21.     1:  Enter the Macro editor in Telix using the Alt-K sequence.
  22.     2:  Select "E"dit Macro keys, and strike the key you wish to
  23.         use to transmit the bbs name.
  24.     3:  Edit this key's macro to read:   @BBS
  25.     4:  Select "S"ave from the Macro editor menu.
  26.     5:  Exit the Macro editor ("X").
  27.     6:  Place the file BBS.SLC in the path indicated as the script
  28.         directory under Alt-O, Telix configuration.  Unless you   
  29.         have changed this under the "Filenames and paths" option,
  30.         this will be your root directory.
  31.  
  32.  
  33.     To insert in an "auto-logon" script: (WILDCAT used as an example)
  34.     -----------------------------------------------------------------
  35.  
  36.         /////////////////////  WILDCAT.SLT  ////////////////////////////
  37.  
  38. // This is a sample script for logging on to a WILDCAT based system.
  39. // The logon questions are handled in any order, and optional prompts are ok.
  40.  
  41. str user_name[] = "John Smith";         //replace John Smith with your name
  42.                     //leave the quotes around your name
  43.  
  44. // Put your name in the above line. The script will get the proper password
  45. // from the dialing directory (Telix puts that password in the script system
  46. // variable called _entry_pass).
  47.  
  48. // Before using this script for the first time, or when you make a change,
  49. // type 'cs WILDCAT' at the DOS prompt to compile the script for use by Telix.
  50.  
  51. //////////////////////////////////////////////////////////////////////////////
  52.  
  53. main()
  54.  
  55. {
  56.  int stat;
  57.  int t1,
  58.      t2,
  59.      t3,
  60.      t4;
  61.  int tmark;
  62.  
  63.  alarm (1);
  64.  
  65.  if (not _entry_pass)                     // no pass, so didn't recog. board
  66.   {
  67.    prints ("Sorry, I don't know the password for this BBS!");
  68.    return;
  69.   }
  70.  
  71.  t1 = track (" graphics", 1);
  72.  t2 = track ("first name?", 1);
  73.  t3 = track ("Password", 1);
  74.  t4 = track ("Language # to use", 1);
  75.  
  76.  tmark = timer_start (1800);            // wait up to 3 minutes for login
  77.  
  78.                                         // answer any logon questions
  79.  while (not time_up (tmark))
  80.   {
  81.    terminal();                          // let Telix process any chars and keys
  82.  
  83.    stat = track_hit (0);                // see which (if any) track was hit
  84.  
  85.    if (stat == t1)                      // say whether we want graphics
  86.     {
  87.      delay (5);
  88.      cputs ("y q^M");
  89.     }
  90.    else if (stat == t2)                 // send name
  91.     {
  92.      cputs (user_name);
  93.      cputs ("^M");
  94.     }
  95.    else if (stat == t3)                 // send password
  96.     {
  97.      cputs (_entry_pass);
  98.      cputs ("^M");
  99.      break;                             // done with logon
  100.     }
  101.    else if (stat == t4)                 // specific to CRS
  102.     {
  103.      delay (5);
  104.      cputs ("^M");
  105.     }
  106.   }
  107.  
  108.  if (time_up (tmark))
  109.   prints ("Logon failed!");
  110.  
  111.  timer_free (tmark);                    // free timer channel
  112.  track_free (0);                        // and all track channels
  113.  calld("bbs");                // put bbs name on status bar
  114. }              
  115.  
  116.  
  117.     The only real change to this script is the very last statement!
  118.     That's all there is to it.  Please note that use of script "BBS"
  119.     will erase both the "ALT-Z for help" and the Terminal Emulation
  120.     portions of the TELIX bottom-line status bar; it was felt that
  121.     knowing the name of the current BBS is more valuable than this
  122.     information, which rarely changes.
  123.  
  124.     TELIX is a copyrighted mark of Exis, Inc., West Hill, Ontario, Canada
  125.