home *** CD-ROM | disk | FTP | other *** search
/ Demo jugable de QUAKE / demo-jugable-quake.iso / win / tfw115c1 / tfw.5 / SHOWOFF.SLT < prev    next >
Encoding:
Text File  |  1996-04-15  |  3.3 KB  |  97 lines

  1. /****************************************************************/
  2. /*                                                              */
  3. /*  Demo of how to use various DOS functions; break signals;    */
  4. /*  miscellaneous video and such.                               */
  5. /*                                                              */
  6. /*                   Copyright 1995 deltaComm Development, Inc. */
  7. /*                                                              */
  8. /****************************************************************/
  9.  
  10. main()
  11. {
  12.  int vpic, c;
  13.  str ss[64];
  14.  str path[64];
  15.  
  16.  vpic=vsavearea(0, 0, 79, 24);               // Store current screen in memory
  17.  call("scrnwip.slt");                        // Call screen wipe script
  18.  
  19.  prints_trm("In this color...");
  20.  delay_scr(30);                  //pause for effect
  21.  prints_trm("  then a little ANSI magic...");
  22.  
  23.  printsc_trm("^[[1;");         // Run a color change
  24.  printn_trm(31);             // through the
  25.  printc_trm('m');            // terminal via ANSI escape sequences....
  26.  
  27.  c=cgetct(30);              // Wait a bit for a keypress (up to 3 seconds)
  28.  
  29.  prints_trm("In another color.");
  30.  
  31.  delay_scr(50);
  32.  _fore_color=7;   //fix up from the ansi escapade
  33.  
  34.  send_brk(10);               // send a comm BREAK signal
  35.  delay_scr(30);
  36.  if (argcount>=0)            // If we got a char, send it along to
  37.    if (c)                    // the tracking functions for addition
  38.      track_addchr(c);
  39.  
  40.  newline();
  41.  getrunpath(ss);             // Where was script run from?
  42.  printsc("Directory script was run from: ");
  43.  prints(ss);
  44.  printsc("Current Script Directory: ");
  45.  prints(_script_dir);
  46.  newline();
  47.  printsc("Current Telix Directory: ");
  48.  prints(_telix_dir);
  49.  
  50.  prints("Press any key to change to this directory");
  51.  prints("and view it's contents.");
  52.  inkeyw();                                   // Wait for keypress
  53.  newdir(_telix_dir);                                 // Go to telix directory
  54.  show_directory("*.*", 0, 0);                // Display directory
  55.  
  56.  if (carrier())                              // Test for carrier
  57.   cnewline();                                 // Line feed locally & over modem
  58.  else
  59.   newline();                                // Local line feed only
  60.  
  61.  prints("Press any key to display the help screen.");
  62.  inkeyw();
  63.  helpscreen();                               // Enter current help screen
  64.  delay_scr(50);
  65.  if (carrier())
  66.   cnewline();
  67.  else
  68.   newline();
  69.  
  70.  prints("Press any key to display the DOS functions menu.");
  71.  inkeyw();
  72.  dosfunction();                                  // DOS function menu
  73.  
  74.  delay_scr(30);
  75.  clear_scr();
  76.  printsc("This script is named: ");
  77.  prints(__file__);                               // Print active filename
  78.  printsc("Currently executing script line ");
  79.  printn(__line__);                               // Print active line number
  80.  newline();
  81.  
  82.  prints();
  83.  prints("Press any key to restore original screen.");
  84.  inkeyw();
  85.  vrstrarea(vpic);                                // Restore original screen
  86.  
  87.  prints("Now for a little entertainment...(Press a key)");
  88.  inkeyw();
  89.  //at least one of these ought to work...
  90.  run("sol.exe", "", 0);
  91.  run("winmine.exe", "", 0);
  92.  path="/n,/e,/root,";
  93.  strcat(path,_telix_dir);
  94.  run("explorer.exe", path, 0); //browse the telix directory, if this is Windows 95
  95.  prints("All done!");
  96. }
  97.