Advertisement
T3RRYT3RR0R

multiline colored font

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