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];
- str path[64];
-
- vpic=vsavearea(0, 0, 79, 24); // Store current screen in memory
- call("scrnwip.slt"); // Call screen wipe script
-
- prints_trm("In this color...");
- delay_scr(30); //pause for effect
- prints_trm(" then a little ANSI magic...");
-
- printsc_trm("^[[1;"); // Run a color change
- printn_trm(31); // through the
- printc_trm('m'); // terminal via ANSI escape sequences....
-
- c=cgetct(30); // Wait a bit for a keypress (up to 3 seconds)
-
- prints_trm("In another color.");
-
- delay_scr(50);
- _fore_color=7; //fix up from the ansi escapade
-
- send_brk(10); // send a comm BREAK signal
- delay_scr(30);
- if (argcount>=0) // If we got a char, send it along to
- if (c) // the tracking functions for addition
- track_addchr(c);
-
- newline();
- getrunpath(ss); // Where was script run from?
- printsc("Directory script was run from: ");
- prints(ss);
- printsc("Current Script Directory: ");
- prints(_script_dir);
- newline();
- printsc("Current Telix Directory: ");
- prints(_telix_dir);
-
- prints("Press any key to change to this directory");
- prints("and view it's contents.");
- inkeyw(); // Wait for keypress
- newdir(_telix_dir); // Go to telix directory
- show_directory("*.*", 0, 0); // Display directory
-
- if (carrier()) // Test for carrier
- cnewline(); // Line feed locally & over modem
- else
- newline(); // Local line feed only
-
- prints("Press any key to display the help screen.");
- inkeyw();
- helpscreen(); // Enter current help screen
- delay_scr(50);
- if (carrier())
- cnewline();
- else
- newline();
-
- prints("Press any key to display the DOS functions menu.");
- inkeyw();
- dosfunction(); // DOS function menu
-
- delay_scr(30);
- clear_scr();
- printsc("This script is named: ");
- prints(__file__); // Print active filename
- printsc("Currently executing script line ");
- printn(__line__); // Print active line number
- newline();
-
- 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();
- //at least one of these ought to work...
- run("sol.exe", "", 0);
- run("winmine.exe", "", 0);
- path="/n,/e,/root,";
- strcat(path,_telix_dir);
- run("explorer.exe", path, 0); //browse the telix directory, if this is Windows 95
- prints("All done!");
- }
-