filmov
tv
Batch File variables for ASCII character animations
Показать описание
This video discusses the use of variables in Windows Batch File ASCII character animations. In particular, it highlights the advantages of FOR loops to created and access the large numbers of variables needed for rows (e.g. set Row%I=ABC), and the substrings needed for column values (e.g. echo !Variable:~%i%!). This is illustrated in the code below for Matrix-style dripping characters.
rem --- Initialize.
setlocal EnableDelayedExpansion
color 0A
set /A "MaxX = 100"
set /A "MaxY = 50"
set /A "lines=MaxY+2","cols=MaxX+1"
mode con lines=%lines% cols=%cols%
set "CharSetWithSpaces= 01233456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
:PERPETUAL_LOOP
rem --- Build the top row.
set /A "TopRow = (TopRow + 1) %% (MaxY + 1)"
set "Row_%TopRow%="
for /L %%X in (1,1,%MaxX%) do (
set /A "i = !RANDOM! %% 70"
call set "Row_%%TopRow%%=!Row_%TopRow%!%%CharSetWithSpaces:~!i!,1%%"
)
rem --- Display Screen.
set /A "Top2 = TopRow + 1"
cls
for /L %%Y in (%TopRow%,-1,0) do echo(!Row_%%Y!
for /L %%Y in (%MaxY%,-1,%Top2%) do echo(!Row_%%Y!
goto :PERPETUAL_LOOP
(C) Copyright 2012 Mr Batch Files.
rem --- Initialize.
setlocal EnableDelayedExpansion
color 0A
set /A "MaxX = 100"
set /A "MaxY = 50"
set /A "lines=MaxY+2","cols=MaxX+1"
mode con lines=%lines% cols=%cols%
set "CharSetWithSpaces= 01233456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
:PERPETUAL_LOOP
rem --- Build the top row.
set /A "TopRow = (TopRow + 1) %% (MaxY + 1)"
set "Row_%TopRow%="
for /L %%X in (1,1,%MaxX%) do (
set /A "i = !RANDOM! %% 70"
call set "Row_%%TopRow%%=!Row_%TopRow%!%%CharSetWithSpaces:~!i!,1%%"
)
rem --- Display Screen.
set /A "Top2 = TopRow + 1"
cls
for /L %%Y in (%TopRow%,-1,0) do echo(!Row_%%Y!
for /L %%Y in (%MaxY%,-1,%Top2%) do echo(!Row_%%Y!
goto :PERPETUAL_LOOP
(C) Copyright 2012 Mr Batch Files.
Batch File variables for ASCII character animations
Batch Animation with ASCII Sequence
Creating a Coin Toss app implementing the dynamic variable %random% in Batch Script using Ascii art.
how to create ASCII batch file
Batch Scripting - 7 - Variables in Directors
Batch Tutorial Psychedelic ASCII Matrix HOW TO
ascii characters to batch files
Coding for 1 Month Versus 1 Year #shorts #coding
Windows : How can I store a NULL ASCII character (nul) in a variable with a Windows batch script?
Windows Batch Files Tutorial Part 2: Setting variables and creating txt files!
How to make Variables in Batch file (tutorial)
How did I found some Special Characters like Backspace, and Delete in Batch Script ? | batch script
Best Programming Languages #programming #coding #javascript
Windows Batch Script: If statement string comparison from user input
Make a File Maker in Batch File #batch_file #batch #cmd #command_prompt #how_to_make_file_maker
The HARDEST part about programming 🤦♂️ #code #programming #technology #tech #software #developer...
BatchFile Turtoul 1: Variables
Making A Complex Batch File #3 | CMD
Batch File ASCII character animation and use of color
How To Make a Batch File
Spaces and Parenthesis in windows PATH variable screws up batch files (8 Solutions!!)
How to get ASCII characters when using choice command in batch?
Batch File Tutorial: Color in Batch Files!!! (NEW 2021)
Image to ASCII art in CMD with do's and dont's | TechTurfy | ASCII art | batch file
Комментарии