Loading effect in batch

 by iRule
loading.bmp
This is second instructable .. so still go easy on me .. ty

This script is a loading script .. well it only looks like one , it doesn't actually load anything .. its if you just want the effect of something in a batch file to seem like it is loading ...
I will give you the script and i will show you how i did it ...
please leave a comment about what you thought ... Thanks

Also because of how awesome El Mano is =P
somewhere on the comments he has posted a better version of this..
Thanks El Mano =D .. saves me the work of posting it.
 
Remove these adsRemove these ads by Signing Up

Step 1: Steal My Script

OK if you can't be bothered to see how it works then you can just steal my script . I attached it . so you will have to delete one of the 'b's off the file extension for it to be readable.. and you will have to edit what it says at the top of the script .. and remove the 'By iRule' at the bottom of the script.. if something doesn't work please pm me or leave a comment...
El Mano says: Jan 8, 2009. 9:30 PM
This is a cool program, but it takes up a lot of space, making your file large and hard-to-edit. This is a much shorter, if more complicated, way:

@echo off
title Loading... By El Mano
color 0a
set load=
set/a loadnum=0
:Loading
set load=%load%()
cls
echo.
echo Loading... Please Wait...
echo ----------------------------------------
echo %load%
echo ----------------------------------------
ping localhost -n 2 >nul
set/a loadnum=%loadnum% +1
if %loadnum%==20 goto Done
rem You can set the number of ()'s as whatever you rem want but remember: in your "loading box" you rem need 2 spaces for every () because "()" takes up rem 2 spaces. The above box has 40 spaces, so rem twenty repeats, adding 1 () every repeat.
goto Loading
:Done
echo.
pause
rem *your action here*
exit

Feel free to modify, use, or ignore this. It's not copyrighted.
power5000 in reply to El ManoFeb 16, 2012. 1:22 PM
Hi i know this was all the way back in 2009 but I was wondering if you could explain this a little bit i dont understand the
" set load=%load%"
why not just
"set load=()"?
El Mano in reply to power5000Feb 16, 2012. 3:55 PM
This script works by making a line of ()'s across the screen. Each time it loops, it adds a () to the echoed script, so the first time it loops it echoes "()," then second time "()()", the third time "()()()", and so on.

Set load=%load%()

takes what %load% already contains, a number of ()'s, and adds another () to the end of the line, so that with each loop the screen echoes one more ().
power5000 in reply to El ManoFeb 17, 2012. 7:06 PM
yeah thankyou for commenting so quickly i was looking at it at realizit it was kinda like
%number%+1
but for a variable very cool thank you ^.^
goeon in reply to El ManoMar 19, 2009. 9:09 PM
nice script
iRule (author) in reply to El ManoJan 9, 2009. 12:43 PM
yer i know it is a very long script and i know you can do it that way but i posted this when i was still not very good with batch so i did it the long way
fwjs28 says: Dec 14, 2008. 1:21 PM
this would be cool for a fake virus.....something like:....i also found a bit of an error...right around the 50% mark to 70% or so, the please wait is in different positions, so i changed it and it looks right...(maybe not)....i also deleted all the echo. 's...all it does it add size....unless u made it that way for a reason....
Jamtaktics in reply to fwjs28May 28, 2011. 5:32 PM
haha, I did the same thing! except, after it "deletes" everything it runs a blue screen of death on you!
B.F.L.M in reply to fwjs28May 3, 2009. 9:12 PM
sorry about using this comment to ask this but, if i added shutdown -s -t 10 -c "good-bye." would it still work?
fwjs28 in reply to B.F.L.MMay 5, 2009. 1:03 PM
it would still work , but yod have to add it to towards the bottom like so: echo RAM failure echo contact local computer repair and report ID ten T error shutdown -s -t 10 -c "good-bye."
B.F.L.M in reply to fwjs28May 5, 2009. 3:35 PM
Thanks
fwjs28 in reply to B.F.L.MMay 5, 2009. 4:29 PM
yerp....any other questions and i'd gladly help...
iRule (author) in reply to fwjs28Dec 14, 2008. 1:27 PM
I added some echo's at the beginning so it would be in the centre..left centre
fwjs28 in reply to iRuleDec 14, 2008. 2:57 PM
um...k...do u like my little version of urs?
iRule (author) in reply to fwjs28Dec 15, 2008. 9:21 AM
lol your virus version is really good :]
fwjs28 in reply to iRuleDec 15, 2008. 11:33 AM
i also found that at 96% and 100% the bars are at the same place....ill work on that and post an update for you as soon as i get home....
fwjs28 in reply to iRuleDec 15, 2008. 11:30 AM
rlly?it was a quick 5 min throw together...i have 2 questions.....1:would you like to colborate with my little instructable on batch? and 2: i am trying to make a password vault...but im not sure a couple bits...ill send you a scan of the rough draft as soon as my scaner works....ty
iRule (author) in reply to fwjs28Dec 15, 2008. 2:09 PM
ok sure .. and kk ty ..lol
One. says: Feb 12, 2010. 6:41 PM
 cool!
will421 says: Jun 18, 2009. 10:53 AM
Has everyone forgot the sleep command?
iRule (author) in reply to will421Jun 19, 2009. 9:05 AM
yes because you need the external exe for that this way you only need 1 file for your batch
animan1 says: Jun 1, 2009. 7:17 PM
sweet i edited it but its great thanx for all ps ho w do you add a download link
iRule (author) in reply to animan1Jun 5, 2009. 3:54 PM
download link? you meen o download file off web? ... And do you meen auto done after loading thing or do you want th press button to download?
XOIIO says: Apr 29, 2009. 5:22 PM
omg great! i have it set up so at the end it opens another batch file! its great to fool people. im going to use the same idea to make a batch stop motion animation movie someday
iRule (author) in reply to XOIIOMay 3, 2009. 3:31 PM
go here ( my site ) : link
its a better version of this and uses less space =]
XOIIO in reply to iRuleMay 3, 2009. 4:12 PM
Thanks, it is better, but i sort of like this version because it takes longer.
elfshade says: Feb 26, 2009. 7:12 PM
i combined this with keyboard led loader (vbs) http://www.instructables.com/id/keyboard_led_loader/
-code-
ping localhost -n 2 >nul
rem call keyboard led loader
start twinkle.vbs
cls
echo.
-/code-
then actually called a program
-code-
echo.
echo.
echo ***************************************
echo ************* Thanks For **************
echo **************** Your *****************
echo **************** Time *****************
echo ***************************************

pause >nul

start C:\Program Files\Gamescampus\xiah\xiah.exe
-/code-

then used bat to exe to put it all into one file added the xiah icon and sent it to my friends who play this game all the time
iRule (author) in reply to elfshadeFeb 27, 2009. 1:34 PM
cool looks good
BBZS says: Dec 9, 2008. 2:12 PM
WOW, even though it's lot really a loading bar, you can make it seem like it, that's so cool! Thanks so much!
iRule (author) in reply to BBZSDec 10, 2008. 12:07 PM
lol cheers .. you could actually make it load something if you add in bits of your code at each section of the script ;)
BBZS in reply to iRuleDec 10, 2008. 2:20 PM
Yeah, I thought so, like starting components to an exe file in the background (hidden) and then open the exe file once the file is complete.
Arbitror says: Dec 4, 2008. 4:17 PM
I think that this is pointless in a actual batch program where you want to get something done. But, It would be good in a batch movie. If I were going to put a loading command, then I would actually make the loading screen real. For instance, It would only show for the amount of time to load, with you can do with the call command.
iRule (author) in reply to ArbitrorDec 5, 2008. 2:30 PM
cheers I think ? ... i know it would be pretty pointless in an actual script but i thought that might come useful to someone like someone making a movie
spiker says: Nov 13, 2008. 2:22 PM
Very nice Instructable. I like the idea, i might use that in a project of mine, maybe in a text/batch movie.....:D thanks again keep it up
iRule (author) in reply to spikerNov 13, 2008. 2:30 PM
ty .. n id like to see ur finished movie thing when its done :D
spiker in reply to iRuleNov 13, 2008. 8:40 PM
lol, now i have a reason to finish it :D ill get it to ya ASAP now
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!