Introduction: Batch Matrix Effect
To do this instructable you need a basic knowledge of batch. If you don't you make find this difficult so I'll try and make it simple.
By the end of this you should be left with a matrix effect batch file.
Step 1: Easy Version- the Bare Minimum
This is the core of the matrix script we are writing. This is just the bare minimum and other addons can be added to make it more interesting.
Copy the following code into a notepad file:
@ echo off
color 0a
:a
echo %random%%random%%random%
%random%%random%%random%
%random%%random%%random%
%random%%random%%random%
%random%%random%%random%
%random%%random%%random%
goto a
save this as a .bat file.
Now click on the .bat file you just saved. You should have a basic matrix effect.
Step 2: Intermediate- Refined Copy
This is a more refined and sophisticated of the code in the previous step. It includes a title and requires a key to be pressed to activate.
Copy into notepad:
@echo off
title Matrix Effect by Draja
echo Enter the Matrix
pause
color 0a
mode 1000
:A
echo %random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
goto A
As before save as a .bat file
Step 3: Enjoy and Post Feedback
I look forward to your feedback and any addittions you have made or would like to see.
9 Comments
Question 3 years ago
My computer doesn't have .bat as an option for file save. Is there an alternative?
Answer 3 years ago
If you copied the code in Notepad, then (still in Notepad) click on 'File' on the top bar.
Then Click on 'Save as...'.
Then (in the new window) Click the bar that is beside 'Save as type:'.
Then Click on the 'All files' option.
Now, enter your file name first in the 'File Name' bar.
Finally, make sure the file name ends with ' .bat '.
8 years ago on Introduction
8 years ago on Introduction
9 years ago on Introduction
@echo off
title Matrix Effect by Draja
echo Enter the Matrix
pause
color 0a
mode 1000
:A
echo %random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
%random%%random%%random%%random%%random%%random
%%random%%random%%random%%random%%random%
goto A
this code is fake because
%%random%%random%%random%%random%%random%
instead of
%random% %random% %random% %random% %random%
notice the space between % %
10 years ago on Introduction
A much MUCH more effective way of doing this is:
@echo off
color 0a
setlocal enabledelayedexpansion
for /l %%a in (0,0,1) do (<nul set /p="!random!")
::This will go forever, until user inputs "Ctrl+C" or closes the window
It would much faster, and would fill the entire line for everyline. I also recommend you look into writing up different colours in CMD on this link http://stackoverflow.com/questions/4339649/how-to-have-multiple-colors-in-a-batch-file
Reply 10 years ago on Introduction
Use the MODE command to adjust the screen size. like using the MODE 1000 darja used in the original, fills the screen nicely.
Reply 10 years ago on Introduction
Yea, he uses it in the third example. But the problem with that is it may be too big for some screens, What would be better is starting it at maw window, guaranteeing it will fit on the screen
10 years ago on Introduction
Batch files, they can do many things.
I inserted a line to slow it down just a bit.
ping -n 1 127.0.0.1 >nul
added just before the goto A