An official Batch Programming blog! To Solve the daily problems with windows and fixing them with little notepad scripts. Unlock the Hidden Secrets of Windows, Learn to crack Software via CMD & Make your own Programming tools. Understand to Manipulate your PC via CMD.

SIMPLE ANIMATION IN CMD 2.0 | ADVANCED batch method

SIMPLE ANIMATION IN CMD: In the last article, Animating A Text Or String Inside The CMD Console [Intermediate level], we used a simple algorithm to fulfill our task of putting a string on the console at a specified location, i.e. x,y coordinates.

We really don’t need to use any extra plugin for that, the trick is as simple as life on Earth. However, in this article, we’re going to look at running multiple animations at once, which will require some batch code magic!

What we have to do is to put the string after ‘y‘ empty lines and ‘x‘ blank spaces.
The situation will become more clear and easy to understand by the help of an example.

Algorithm For Simple Animation – 1 ELement only
Animating Two Text Strings in CMD

make Animation in CMD? – Advanced Method

Let’s suppose if we want to put a string “Karanveer” on the console at the location 5,7 then we only have to run a loop (which may be a ‘for loop’) to leave 6 empty lines before printing the string {Because the string will be on the 7th line}.

So, we have to leave {7-1=6 lines}.

We also will have to run a loop to put the required spaces before the string. So, we require 5 spaces before the string, thus printing it on the console.

Two Moving Strings using BatBox
Two Moving Strings using BatBox

Hence, the string will be printed at the required location on the console. However, this animation is taking place in the CMD console. If you remember from our last animation article, its very hard to have multiple animations at once.

Also Read:  LOCK A FOLDER WITH CMD - Locker 2.0 (My First Batch Application)

So, we need to use a plugin to print the text we want within the previous algorithm. By doing this, we can detect when the two strings bump into each other and have them react accordingly! But, the collision among themselves may be undetermined. So, using another Batch plugin will make this work easier for us.

So, we are using a batch plugin in this version of the Batch Animation. I’ve created 2 different test scripts that use 2 different Batch plugins, Batbox.exe & fn.dll. Each of them has their own qualities. Batbox.exe can take multiple commands in a single go,
whilst fn.dll is fast and responsive in repetitive calls from the batch file.

From The Editor’s Desk

They both are efficient enough in their own way. You can download both the batch files from the link at bottom of this article, and experience their difference by yourself! That concludes our article, Make sure you let us know how you used the project in the comments below! Also, check out our discord!

HASH Code - For Verification - (SHA-256)
ccabb3e5fbb3f38aa9722c0fae5b9d86bd80c287743efc0797f563e50df23e15

Keep learning, keep sharing….
Be happy, spread happiness…

TheBATeam

Download Link

Next Post

Previous Post

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2020 TheBATeam

Our Core Values   /   Terms & Conditions   /   Privacy Policy   /   Why Register?

Theme by Anders Norén