Created
June 19, 2023 14:03
-
-
Save earnhardt3rd/94c606a04b07c5269270dbc05977c3b3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'getopts.pl'; | |
| Getopts('m:d:t'); | |
| my $MODE = uc($opt_m) || ""; | |
| my $DEBUG = $opt_d || 0; | |
| if (defined $opt_t) { my %TEST = &_SET_CON();} | |
| 1; | |
| sub _SET_CON { | |
| my %CON_COLORS = ( | |
| ("Black" => "0"), | |
| ("Blue" => "1"), | |
| ("Green" => "2"), | |
| ("Aqua" => "3"), | |
| ("Red" => "4"), | |
| ("Purple" => "5"), | |
| ("Yellow" => "6"), | |
| ("White" => "7"), | |
| ("Gray" => "8"), | |
| ("Light Blue" => "9"), | |
| ("Light Green" => "A"), | |
| ("Light Aqua" => "B"), | |
| ("Light Red" => "C"), | |
| ("Light Purple" => "D"), | |
| ("Light Yellow" => "E"), | |
| ("Bright White" => "F") | |
| ); | |
| system("mode 100,50"); | |
| system("color fc"); | |
| print " *******************************************\n"; | |
| print " ** SHUT-DOWN PRODUCTION SERVICE DESK APP **\n"; | |
| print " *******************************************\n"; | |
| print " 1. Maintenance Window\n"; | |
| print " 2. Application Failure\n"; | |
| print " 3. Other\n"; | |
| print " 4. Abort\n"; | |
| print " Please Select Reason for Shut-Down [Abort]:"; | |
| <STDIN>; | |
| system("color 1f"); | |
| system("mode 200,5000"); | |
| <STDIN>; | |
| foreach my $bg(sort keys %CON_COLORS) { | |
| foreach my $fg(sort keys %CON_COLORS) { | |
| next if ($bg eq $fg); | |
| system("mode 57,7"); | |
| print " What do you think? [$bg][$fg] as: " . $CON_COLORS{$bg} . $CON_COLORS{$fg}; | |
| system("COLOR " . $CON_COLORS{$bg} . $CON_COLORS{$fg} . ""); | |
| <STDIN>; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment