T3RRYT3RR0R

multiline colored font

May 14th, 2021 (edited)
462
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <# : batch portion
  2. :# The above line marks the beginning of a powershell comment block; {the Batch component of the Script.} Do not modify.
  3.  
  4. ::: Author: T3RRY : Created: 14/05/2021 Filename: font.bat
  5. :# - System Requirements: Window 10, ansi support
  6. :# PURPOSE:
  7. :# - Facilitate output of custom multiline fonts with user defined color and character symbols
  8. :# - More font sizes and styles coming. watch this space!
  9. :# - Version changes: /XC switch modified to so that characters of centre aligned text now retain
  10. :#   alignment with left aligned text.
  11. :#
  12. :# IMPORTANT USER INFORMATION:
  13. :# This demo script uses alternate data streams to store runstate and output data.
  14. :# Streams are used as an alternative to creating additional files on the users system.
  15. :# Modifiying and saving this script after it has been run, and streams have been associated with the file will
  16. :# result in a 'severe' level security alert.
  17. :# - To view streams associated with a file, open cmd; navigate to the files directory, and type: dir /r
  18. :# - To view or edit the content of a files stream: open cmd ant type: notepad.exe filename:streamname.ext
  19. :#    Note: the above method of opening a streams content in notepad REQUIRES the streams name to be suffixed
  20. :#     with an extension compatable with notepad or your chosen text editor.
  21. :#
  22. :# Inspired by:
  23. :# https://codegolf.stackexchange.com/a/224801/92319
  24.  
  25. @Echo off
  26.  
  27. :# restart script in new window, ensures window is not already in fullscreen mode
  28.  If "%~1" == "" (start /high "" "%~f0" new&Exit)
  29.  
  30. :# Requires ntfs drive for stream usage:
  31. :# https://docs.microsoft.com/en-us/windows/win32/fileio/file-streams
  32.  
  33.  (Echo(verify > "%TEMP%\%~n0_NTFStest:IO:$Data") 2> nul
  34.  If not exist "%TEMP%\%~n0_NTFStest" (
  35.   Echo(Permission or Drive type Error. Write permission required on an NTFS drive.
  36.   Pause & Exit /B 1
  37.  )Else Del "%TEMP%\%~n0_NTFStest"
  38.  
  39.  cd /d "%~dp0"
  40.  
  41.  Cls
  42.  
  43. :# Test ansi support
  44.  Reg Query HKCU\Console | %SystemRoot%\System32\findstr.exe /LIC:"VirtualTerminalLevel    REG_DWORD    0x1" > nul || (Echo(virtual terminal support not enabled & Exit /B 1)
  45.  
  46. :# Define escape character for virtual terminal sequences
  47.  For /f %%a in ('Echo(prompt $E^|cmd')Do set "\E=%%a"
  48.  
  49. :# Enable use of UTF-8 character set
  50. chcp 65001 > NUL
  51.  
  52. (Set \n=^^^
  53.  
  54. %= \n macro newline variable. Do not modify =%)
  55. (Set LF=^
  56.  
  57.  
  58. %= LF newline variable. Do not modify =%)
  59.  
  60. :# $Font macro switches. Defined outside macro for readability and maintainance.
  61.  
  62.  Set $font[Switches]="N" "C" "Col" "F" "T" "LF" "BG" "HC" "SC" "X" "XC"
  63.  
  64. :# $Font macro. Outputs multiline characters declared as arguments prior to switches.
  65. :#  character '/C' and color '/Col' information.
  66. :# Usage: %$font% [character list] [/f Integer] [/Switches]
  67. :# Usage: [/f Integer] [/Switches]
  68. :# Also accepts arguments for:
  69. :# - Newline: '/N $#'
  70. :#    Shift the cursor down by a !$#{y}! cells, where # is the font number
  71. :# - Subsecond delay: '/T [Integer|Sum]'
  72. :#    {50000 = ~ 1 second}
  73. :# - Hide cursor: /HC
  74. :# - Show cursor: /SC
  75. :# - emit a single linefeed: /LF
  76. :# - emit a blank colored line /BG VtSequence
  77. :#    Vt sequence: "Integer" or "Integer;Integer"
  78. :#    See:   https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#text-formatting
  79. :#    Use VT color sequence '7' or '48;2;r;g;b' to invert color.
  80. :# - Cursor X position:
  81. :#   /X [Integer{position}]
  82. :#    - absolute X. Does not align characters on other lines.
  83. :#   /XC [Integer{string length}] [$Integer{font number}]
  84. :#    - Center string along X axis, aligned with output on other lines.
  85.  
  86.  Set $font=For %%n in (1 2)Do if %%n==2 (                                          %\n: CAPTURE ARG STRING =%
  87.   For /F "Tokens=1,2 Delims==" %%G in ('Set "$font_" 2^^^> nul')Do Set "%%~G=" %\n: RESETS ALL MACRO INTERNAL VARS =%
  88.   If not defined $font_char Set "$font_char=X"%\n%
  89.   If not "!$font[args]:* /=!" == "!$font[args]!" (                              %\n: BUILD $font.Args[!$font_arg[i]!] ARRAY IF ARGS PRESENT =%
  90.    Set "$font_leading.args=!$font[args]:*/=!"                                  %\n: SPLIT ARGS FROM SWITCHES =%
  91.    For /F "Delims=" %%G in ("!$font_leading.args!")Do Set "$font_leading.args=!$font[args]:/%%G=!"%\n%
  92.    Set ^"$font[args]=!$font[args]:"=!"                                          %\n: REMOVE DOUBLEQUOTES FROM REMAINING ARGSTRING - SWITCHES =%
  93.    Set "$font_arg[i]=0"                                                            %\n: ZERO INDEX FOR ARGS ARRAY =%
  94.    For %%G in (!$font_leading.args!)Do (                                           %\n: BUILD ARGS ARRAY =%
  95.     Set /A "$font_arg[i]+=1"%\n%
  96.     Set "$font_arg[!$font_arg[i]!]=%%~G"%\n%
  97.     For %%i in ("!$font_arg[i]!")Do (                                              %\n: SUBSTITUTE THE FOLLOWING POISON CHARACTERS =%
  98.      Set "$font_arg[%%~i]=!$font_arg[%%~i]:{SC}=;!"%\n%
  99.      Set "$font_arg[%%~i]=!$font_arg[%%~i]:{FS}=/!"%\n%
  100.      Set "$font_arg[%%~i]=!$font_arg[%%~i]:{AS}=*!"%\n%
  101.      Set "$font_arg[%%~i]=!$font_arg[%%~i]:{EQ}==!"%\n%
  102.      Set ^"$font_arg[%%~i]=!$font_arg[%%~i]:{DQ}="!"%\n%
  103.     )%\n%
  104.    )%\n%
  105.   ) Else (                                                                              %\n: IF NO ARGS REMOVE DOUBLEQUOTES FROM ARGSTRING - SWITCHES =%
  106.    Set ^"$font[args]=!$font[args]:"=!"%\n%
  107.   )%\n%
  108.   For /L %%L in (2 1 4)Do If "!$font_LastSwitch!" == "" (%\n%
  109.    If "!$font[args]:~-%%L,1!" == " " Set "$font_LastSwitch=_"%\n%
  110.    If "!$font[args]:~-%%L,1!" == "/" (                                              %\n: FLAG LAST SWITCH TRUE IF NO SUBARGS ; FOR SWITCHES UP TO 3 CHARCTERS LONG =%
  111.     For /F "Delims=" %%v in ('Set /A "%%L-1"')Do Set "$font_Switch[!$font[args]:~-%%v!]=true"%\n%
  112.     If not "!$font[args]:/?=!." == "!$font[args]!." Set "$font_Switch[help]=true"%\n%
  113.     Set "$font[args]=!$font[args]:~0,-%%L!"%\n%
  114.     Set "$font_LastSwitch=_"%\n%
  115.    )%\n%
  116.   )%\n%
  117.   For %%G in ( %$font[Switches]% )Do If not "!$font[args]:/%%~G =!" == "!$font[args]!" (%\n: SPLIT AND ASSIGN SWITCH VALUES =%
  118.    Set "$font_Switch[%%~G]=!$font[args]:*/%%~G =!"%\n%
  119.    If not "!$font_Switch[%%~G]:*/=!" == "!$font_Switch[%%~G]!" (%\n%
  120.     Set "$font_Trail[%%~G]=!$font_Switch[%%~G]:*/=!"%\n%
  121.     For %%v in ("!$font_Trail[%%~G]!")Do (%\n%
  122.      Set "$font_Switch[%%~G]=!$font_Switch[%%~G]: /%%~v=!"%\n%
  123.      Set "$font_Switch[%%~G]=!$font_Switch[%%~G]:/%%~v=!"%\n%
  124.     )%\n%
  125.     Set "$font_Trail[%%~G]="%\n%
  126.     If not "!$font_Switch[%%~G]!" == "" If "!$font_Switch[%%~G]:~-1!"==" " Set "$font_Switch[%%~G]=!$font_Switch[%%~G]:~0,-1!"%\n%
  127.     If "!$font_Switch[%%~G]!" == "" Set "$font_Switch[%%~G]=true"%\n%
  128.     If not "!$font_Switch[%%~G]!" == "" If not "!$font_Switch[%%~G]!" == "true" (%\n%
  129.      Set "$font_Switch[%%~G]=!$font_Switch[%%~G]:{SC}=;!"%\n%
  130.      Set "$font_Switch[%%~G]=!$font_Switch[%%~G]:{FS}=/!"%\n%
  131.      Set "$font_Switch[%%~G]=!$font_Switch[%%~G]:{AS}=*!"%\n%
  132.      Set "$font_Switch[%%~G]=!$font_Switch[%%~G]:{EQ}==!"%\n%
  133.      Set "$font_Switch[%%~G]=!$font_Switch[%%~G]:{QM}=?!"%\n%
  134.      Set ^"$font_Switch[%%~G]=!$font_Switch[%%~G]:{DQ}="!"%\n%
  135.     )%\n%
  136.    )%\n%
  137.   )%\n: SWITCH ASSESSMENT BELOW. =%
  138.   If "!$font_Switch[HC]!"=="true" ^<nul Set /P "=%\E%[?25l"%\n%
  139.   If "!$font_Switch[SC]!"=="true" ^<nul Set /P "=%\E%[?25h"%\n%
  140.   If not "!$font_Switch[Col]!"=="" If not "!$font_Switch[Col]!"=="" ^<nul set/P "=%\E%[!$font_Switch[Col]!m"%\n%
  141.   If not "!$font_Switch[C]!"=="" Set "$font_char=!$font_Switch[C]:~0,1!"%\n: Defaults to 't' if switch is used w/out arg value =%
  142.   If not "!$font_Switch[N]!"=="" (For %%v in ("!$font_Switch[N]: =!")Do ^<nul set/P "=%\E%[!%%~v{y}!B%\E%[1G")%\n%
  143.   If "!$font_Switch[LF]!"=="true" ^<nul set /p =%\E%[1E%\n%
  144.   If not "!$font_Switch[X]!"=="" ^<nul Set /P "=%\E%[!$font_Switch[X]!G"%\n%
  145.   If not "!$font_Switch[XC]!"=="" (%\n%
  146.    For /F "Tokens=1,2 Delims= " %%1 in ("!$font_Switch[XC]!")Do (%\n%
  147.     For /f "Delims=" %%z in ('Set /A "(!$Font[columns]! - ( !%%2{x}! * %%1 ) ) / 2"')Do (%\n%
  148.      For /L %%i in (1 !%%2{x}! !$Font[columns]!)Do If %%i LEQ %%z set "$Font_Centre=%%i"%\n%
  149.     )%\n%
  150.    )%\n%
  151.    ^<nul Set /P "=%\E%[!$Font_Centre!G"%\n%
  152.   )%\n%
  153.   If not "!$font_Switch[BG]!"=="" If not "!$font_Switch[BG]!"=="true" ^<nul set/P "=%\E%[!$font_Switch[BG]: =!m%\E%[K%\E%[0m"%\n%
  154.   If not "!$font_Switch[T]!"=="" (Set /A "$font_Switch[T]=!$font_Switch[T]!+0")Else Set "$font_Switch[T]=0"%\n%
  155.   For /f "delims=$" %%f in ("!$Font_Switch[F]!")Do For /L %%i in (0 1 !$font_arg[i]!)Do For %%c in (!$font_arg[%%~i]!)Do (%\n%
  156.    For %%c in (!$Font[%%f][%%c]!)do (%\n%
  157.     If /I "%%c"=="+" ^<nul set/P "=%\E%7"%\n: Save cursor position =%
  158.     If /I "%%c"=="-" ^<nul set/P "=%\E%8"%\n: Restore cursor position from memory =%
  159.     If /I "%%c"=="L" ^<nul set/P "=%\E%D!$font_char!"%\n%
  160.     If /I "%%c"=="LH" ^<nul set/P "=%\E%[2D!$font_char!"%\E%D%\n: Move left after previous left move =%
  161.     If /I "%%c"=="RS" ^<nul set/P "=%\E%C"%\n%
  162.     If /I "%%c"=="LS" ^<nul set/P "=%\E%D"%\n%
  163.     If /I "%%c"=="US" ^<nul set/P "=%\E%A"%\n%
  164.     If /I "%%c"=="DS" ^<nul set/P "=%\E%B"%\n%
  165.     If /I "%%c"=="R" ^<nul set/P "=%\E%C!$font_char!%\E%D"%\n%
  166.     If /I "%%c"=="UL" ^<nul set/P "=%\E%A%\E%D!$font_char!%\E%D"%\n%
  167.     If /I "%%c"=="UR" ^<nul set/P "=%\E%A%\E%C!$font_char!%\E%D"%\n%
  168.     If /I "%%c"=="DL" ^<nul set/P "=%\E%B%\E%D!$font_char!%\E%D"%\n%
  169.     If /I "%%c"=="DR" ^<nul set/P "=%\E%B%\E%C!$font_char!%\E%D"%\n%
  170.     If /I "%%c"=="U" ^<nul set/P "=%\E%A!$font_char!%\E%D"%\n%
  171.     If /I "%%c"=="D" ^<nul set/P "=%\E%B!$font_char!%\E%D"%\n%
  172.     If not "!$font_Switch[T]!"=="" (For /l %%z in (1 1 !$font_Switch[T]!)Do (Call ))%\n%
  173.    )%\n%
  174.    For /F "Delims=" %%z in ("!$Font_Switch[F]!")Do ^<nul set/P "=!%%z!"%\n%
  175.   )%\n%
  176.   ^<nul set /p=%\E%[0m%\n%
  177.  %= ESCAPE AMPERSANDS AND REDIRECTION CHARACTERS.  =%) Else Set $font[args]=
  178.  
  179.  Set "PS.Utility=For %%n in (1 2)Do if %%n==2 (Echo/!Args!| powershell.exe -noprofile "$Mode = $input ^| ?{$_}; iex (${%~f0} ^| out-string )")Else Set Args="
  180. :# load the variables required for font 1
  181.  
  182.  Call :font[1]
  183.  
  184. :# enable environment for expansion of the $Font macro. must not be enabled prior to $Font macro definition.
  185.  Setlocal EnableExtensions EnableDelayedexpansion
  186.  
  187. :# Relative cursor positioning used in font character output fails when the cursor goes out of bounds
  188. :#  of the visible screen dimensions.
  189. :#
  190. :# * NOT SUPPORTED:
  191. :#  - scrolling
  192. :#  - line wrapping [ Coming soon ]
  193.  
  194. :# toggle fullscreen
  195.  
  196. :# Toggle Fullscreen by calling powershell component of script.
  197.  %PS.Utility% ToggleFS
  198.  
  199. :# Get window dimensions [ line wrapping to be implemented using screen columns / fontwidth compared against count of output letters
  200. :#  between /N newline switch usages. ]
  201.  For /F "Skip=1 Tokens=1,2 Delims=:" %%G in ('Mode Con')Do Echo(%%G|findstr.exe /IC:"lines" /IC:"columns" > nul && (For %%i in (%%G)Do For %%j in (%%H)Do Set "$Font[%%i]=%%j")
  202.  
  203. :# USAGE EXAMPLES
  204.  
  205. :# alternating header. Toggles state using 0 / 1 values in alternate data stream of this file:
  206. :# >"%~f0:runstate.dat" Echo(value
  207. :# reads value via 'more'; pipes value to 'findstr' and uses conditional result of findstr
  208. :# via '&&' and '||' logical operators to execute according to previous state.
  209.  (( more < "%~f0:runstate.dat" ) 2>nul | %__APPDIR__%findstr.exe /c:"1" 2>nul ) >nul && (
  210.   >"%~f0:runstate.dat" ECHO(0
  211.   %$Font% /bg 4;1;7;38;2;12;12;12;48;2;150;;190 /hc
  212.   %$Font% /lf /BG 4;1;7;38;2;25;25;25;48;2;150;;190
  213.   %$Font% /lf /n $1
  214.   %$Font% /XC 18 $1
  215.   %$Font% F O N T WS M A C R O WS B Y WS T 3 R R Y /F $1 /Col 7;38;2;;;150;48;2;150;120; /C ☼ !font[1][%%.]! /T 300
  216.   %$Font% /LF /BG 4;1;7;38;2;12;12;12;48;2;150;;190
  217.   %$Font% /LF /BG 4;1;7;38;2;25;25;25;48;2;150;;190
  218.   <nul Set /P "=%\E%[1E"
  219.   (Call )
  220.  ) || (
  221.   >"%~f0:runstate.dat" ECHO(1
  222.   %$Font% /bg 4;1;7;38;2;12;12;12;48;2;;200;190 /sc
  223.   %$Font% /lf /BG 4;1;7;38;2;25;25;25;48;2;;200;190
  224.   %$Font% /lf /n $1
  225.   %$Font% /XC 12 $1
  226.   %$Font% H E L L O WS W O R L D AP /F $1 /Col 7;38;2;;200;190;48;2;255;; /C ◘ !font[1][%%.]! /T "!random! %%400 + 200"
  227.   %$Font% /hc
  228.  )
  229.  
  230. :# Doublequote args or switches that have values containing parentheses or batch poison characters.
  231. :# Create Data stream containing desired output if data stream does not exist; else output contents of datastream.
  232. :# ** Allows for faster runtime after first execution; as IO only has to be read from the datastream.
  233.  ( more < "%~f0:IO[1].dat" ) 2>nul || (
  234.   (
  235.    %$Font% /n $1
  236.    %$Font% "( ) . # CL SC CM AP QM SQ DQ Mx EQ FS \ + - ~" /F $1 /Col 1;32 /C ▓
  237.    %$Font% /n $1
  238.    %$Font% A B C D E F G H I J K L M /F $1 /Col "7;31;48;2;180;150;0" /C ♫
  239.    %$Font% /n $1
  240.    %$Font% N O P Q R S T U V W X Y Z /F $1 /Col 1;4;34 /C ‼
  241.    %$Font% /n $1
  242.    %$Font% 0 1 2 3 4 5 4 6 7 8 9 /F $1 /Col 35 /C ►
  243.    %$Font% /LF /BG 4;1;7;38;2;12;12;12;48;2;;200;190
  244.    %$Font% /LF /BG 4;1;7;38;2;25;25;25;48;2;;200;190 /sc
  245.    <nul Set /P =%\E%[1E
  246.   ) > "%~f0:IO[1].dat"
  247.   more < "%~f0:IO[1].dat"
  248.  )
  249.  
  250.  Echo(Press 'E' to exit during countdown
  251.  
  252. :# prevent pause being skipped in event of uncleared buffer.
  253.  Choice /N /T 1 /C:1 /D 1 > nul
  254.  Pause
  255.  
  256. :# countdown example
  257.  For /L %%i in (30 -1 0)Do (
  258.   Cls
  259.   Set count=%%i
  260.   (
  261.    %$font% /N $1 /hc /X 5
  262.    If not "!count:~1,1!" == "" For /F "tokens=1,2 Delims=;" %%1 in ("!count:~0,1!;!count:~1,1!")Do (
  263.     Set /A $Col=%%1+2
  264.     %$Font% %%1 /f $1 /C %%1 /Col 3!$Col!
  265.     %$Font% %%2 /f $1 /C %%2 /Col 3!$Col!
  266.    )Else (
  267.     %$Font% 0 /f $1 /C 0 /Col 7;38;2;1%%i%%i;;
  268.     %$Font% %%i /f $1 /C %%i /Col 7;38;2;1%%i%%i;;
  269.    )
  270.   ) > "%~f0:IO[2].dat"
  271.   more < "%~f0:IO[2].dat"
  272.   Choice /T 1 /N /C:Ep /D p > nul
  273.   If !Errorlevel!==1 Goto :End
  274.  )
  275.  
  276. :End
  277. %$Font% /n $1 /sc /T 50000
  278. cls
  279.  
  280. :# Toggle Fullscreen by calling powershell component of script.
  281.  
  282.  %PS.Utility% ToggleFS
  283. Goto :Eof
  284.  
  285. :font[1] font specific variable definition
  286. :# $1    = font specific variable that is used to position cursor ready for the next character. '/F $1'
  287. :#         DRAWING of characters starts at cell beneath bottom left of 5x5 grid; and ends at bottom right of the 5x5 grid
  288. :# $1{y} = Hieght of font; with offset of +1. '/F $1' '/N $1'
  289. :# $1{x} = Width of font characters; with an offset of +1. '/F $1' '/XC [character count] $1'
  290.  Set "$1=%\E%B%\E%[2C"
  291.  Set "$1{y}=6"
  292.  Set "$1{x}=6"
  293.  
  294.  Set $font[1][a]= U U U + U UR R R DR D - R R R R D D
  295.  Set $font[1][b]= U U U + R R - U U R R R DR DL DR DL + L LH - RS
  296.  Set $font[1][c]= US + U U U UR R R DR - R R R UR DS
  297.  Set $font[1][d]= U U U U U R R R DR D D  DL + L LH LH - RS
  298.  Set $font[1][e]= U + U U U U R R R R - U U R R R - R R R R
  299.  Set $font[1][f]= U + U U U U R R R R - U U R R R - RS RS RS RS
  300.  Set $font[1][g]= U + U U U UR R R R - R R R R + U U L -
  301.  Set $font[1][h]= U U U + U U - R R R R + U U - D D
  302.  Set $font[1][i]= U R R + U U U U L LH R R R - R R
  303.  Set $font[1][j]= US + U U - R R R + UR U U U L LH LH LH - RS
  304.  Set $font[1][k]= U U + U U U - UR UR UR R - US R DR DR R
  305.  Set $font[1][l]= U + U U U U - R R R R
  306.  Set $font[1][m]= U U U U U DR DR UR UR D D D D
  307.  Set $font[1][n]= U U U U U DR DR DR DR + U U U U -
  308.  Set $font[1][o]= US + U U U US R R R RS D D D - R R R RS
  309.  Set $font[1][p]= U U U U U R R R DR + DL L LH - DS DS DS
  310.  Set $font[1][q]= US U U U UR R R DR D DL + UL - DL L - DR
  311.  Set $font[1][r]= U U U + U U R R R DR DL L - R DR DR R
  312.  Set $font[1][s]= U R R R + UR UL L LH LH UL UR R R R - RS
  313.  Set $font[1][t]= RS RS U + U U U U L LH R R R - RS RS
  314.  Set $font[1][u]= US + U U U U - R R R UR + U U U - DS
  315.  Set $font[1][v]= RS UR + UL UL U U - UR + UR U U - RS DS
  316.  Set $font[1][w]= U + U U U U - R UR + U U U - DR R + U U U U    -
  317.  Set $font[1][x]= LS UR UR UR + UR UR - UL UL - DR DR
  318.  Set $font[1][y]= RS RS U U U + UL UL - UR UR - DS DS RS RS
  319.  Set $font[1][z]= U + UR UR UR UR L LH LH LH - R R R R
  320.  Set $font[1][0]= US U U U U R R R R D D D D + L LH LH LH -
  321.  Set $font[1][1]= U R R + U U U U L LH - R R
  322.  Set $font[1][2]= U + U U R R R R U U L LH LH LH - R R R R
  323.  Set $font[1][3]= US LS R R R R R + U UL L LH LH  RS RS R U U L LH LH LH -
  324.  Set $font[1][4]= US US U + U U - R R R R + U U - D D
  325.  Set $font[1][5]= U R R R R + U U L LH LH LH LS U U R R R R -
  326.  Set $font[1][6]= U U U + U U R R R R - R R R R D D + L LH LH LH -
  327.  Set $font[1][7]= US US US US U R R R R D D D D
  328.  Set $font[1][8]= U U U U U R R R R D D + L LH LH LH - D D + L LH LH LH -
  329.  Set $font[1][9]= U R R R R + U U U U L LH LH LH LS D D R R R R -
  330.  Set $font[1][.]= U U R D RS RS RS
  331.  Set $font[1][-]= US US US R R R RS DS DS
  332.  Set $font[1][+]= US RS RS U U + L - U - R DS RS DS
  333.  Set $font[1][\]= US US US US U DR DR DR DR
  334.  Set $font[1][~]= US U U R R D R R U DS DS
  335.  Set $font[1][#]= RS U U + L - U U L U - R R D + U U U R LH U D LH LH - UR DS
  336.  Set $font[1][(]= RS RS RS US + U U U UR - R
  337.  Set "$font[1][)]= U + UR U U UL - RS RS RS RS"
  338.  Set $font[1][CM]= U U R D + D - RS RS RS
  339.  Set $font[1][WS]= US RS RS RS RS
  340.  Set $font[1][EQ]= US U R R R R +  US U L LH LH LH - DS DS
  341.  Set $font[1][CL]= US U US U DS DS DS RS RS RS RS
  342.  Set $font[1][SC]= U U US U DS DS DS RS RS RS RS
  343.  Set $font[1][AP]= U + US U U U - RS RS RS RS
  344.  Set $font[1][QM]= RS UR + US  U R U U L LH LH DL - RS RS
  345.  Set $font[1][FS]= U UR UR UR UR DS DS DS DS
  346.  Set $font[1][Mx]= US UR UR + UR - UL - DR RS DS
  347.  Set $font[1][DQ]= US US RS U U RS R D DS DS DS RS
  348.  Set $font[1][SQ]= US US US RS RS U U DS DS DS RS RS
  349.  Set $font[1][EQ]= US US + US US R R R - R R R RS DS
  350. :# More ASCII characters coming!
  351. exit /b 0
  352.  
  353. :# The below line Marks the end of a Powershell comment Block; And the End of the Batch Script. Do not Modify.
  354. : end batch / begin powershell #>
  355. <#
  356.  Test if input Argument -eq ToggleFs
  357.  If true uses sendKeys to toggle fullscreen.
  358. #>
  359.  
  360. $Mode -eq ' ToggleFS' >$null
  361. If ($Mode -eq " ToggleFS") {
  362.     Add-Type -AssemblyName System.Windows.Forms
  363.     [System.Windows.Forms.SendKeys]::SendWait("{F11}")
  364. }
  365. $Mode -eq ' /?' >$null
  366. If ($Mode -eq " /?") {
  367.     write-output "To toggle Fullscreen Mode: Expand the PS.Utility macro like so:"
  368.     write-output " %PS.Utility% ToggleFS"
  369. }
  370.  
  371.  
  372.  
  373.  
RAW Paste Data