home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************/
- /* */
- /* Demo of how to use various DOS functions; break signals; */
- /* miscellaneous video and such. */
- /* */
- /* Copyright 1995 deltaComm Development, Inc. */
- /* */
- /****************************************************************/
-
- main()
- {
- int vpic, c;
- str ss[64];
-
- vpic=vsavearea(0, 0, 79, 24); // Store current screen in memory
- call("scrnwip.slc"); // Call screen wipe script
-
- prints_trm("In this color...");
- prints_trm(" then a little ANSI magic...");
-
- printsc_trm("^[["); // Run a color change
- printn_trm(31); // through the
- printc_trm('m'); // terminal via ANSI escape sequences....
-
- send_brk(10); // send a comm BREAK signal
-
- c=cgetct(100); // Wait a bit for a keypress (up to 10 seconds)
-
- prints_trm("In another color.");
-
- if (argcount>=0) // If we got a char, send it along to
- if (c) // the tracking functions for addition
- track_addchr(c);
-
- getrunpath(ss); // Where was TFW run from?
- printsc("Current Run Directory: ");
- prints(ss);
-
- prints("Press any key to change to the root directory");
- prints("and view it's contents.");
- inkeyw(); // Wait for keypress
- newdir("\"); // Go to root directory
- show_directory("*.*", 0, 0); // Display directory
-
- if (carrier()) // Test for carrier
- newline(); // Line feed locally & over modem
- else
- cnewline(); // Local line feed only
-
- prints("Press any key to display the help screen.");
- inkeyw();
- helpscreen(); // Enter current help screen
-
- if (carrier())
- newline();
- else
- cnewline();
-
- prints("Press any key to display the DOS functions menu.");
- inkeyw();
- dosfunction(); // DOS function menu
- printsc("This script is named: ");
- prints(__file__); // Print active filename
- printsc("Executing line ");
- printn(__line__); // Print active line number
-
- prints();
- prints("Press any key to restore original screen.");
- inkeyw();
- vrstrarea(vpic); // Restore original screen
-
- prints("Now for a little entertainment...(Press a key)");
- inkeyw();
- run("c:\windows\sol.exe", "", 0);
- }
-