Read Mode
Default

How to Show Simple Loading effect in cmd (No CLS command) | Beginners

October 20, 2014
How to Show Simple Loading effect in cmd... (without using CLS command) | Beginners
Simple Loading, without CLS command
Although we all know, Showing a Loading kind of effect on cmd console is such a dirty task to do, because We need to loop through a code unnecessarily, and clear the console each time a loading effect occurs on the console. It makes our program bulky, as well as blinking screen, while we use cls command each time in the iteration.

But as we notice in some of the old DOS application of Microsoft, they have smoothly showed the loading effect on the console screen, without any blinking (cls) of the screen. So, How they were able to do that loading effect? Here, in this post we gonna know about the method of Microsoft, or some similar method that Microsoft might have used in their old programs.

How to Show Simple Loading effect in cmd... (without using CLS command) | Beginners
Loading Effect
The Question was asked to #TheBATeam on our Facebook page by someone, who is too much curious to know things as we are. So, here we are replying to his answer as well as helping someone else, who would have the same or similar question in their mind.

The answer to requested Question is as follows:
In this Problem's Solution... I'm gonna use the Unique property of 'SET' command in batch programming, and few of the Handle options, which allow us to redirect the input or output Handles of a certain command in the Batch Programming.

Try out the following code:


________________________________Code Starts________________________________

@echo off
cls
echo.
echo.
set /p ".=Loading" <nul
timeout /t "1" >nul
set /p ".=." <nul
timeout /t "1" >nul
set /p ".=." <nul
timeout /t "1" >nul
set /p ".=." <nul
timeout /t "1" >nul
set /p ".=." <nul
timeout /t "1" >nul
set /p ".=(Done)" <nul
pause

________________________________Code Ends________________________________



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

Download link : Loading effect

#TheBATeam

1 comment:

  1. this's what i'm looking for.. thanks

    ReplyDelete

Powered by Blogger.