Go Back   FileForums > Off Topic > Software

Reply
 
Thread Tools Display Modes
  #1  
Old 11-05-2021, 10:25
Newbie-repacker Newbie-repacker is offline
Banned
 
Join Date: Apr 2021
Location: In My Home Sweet Home
Posts: 27
Thanks: 57
Thanked 0 Times in 0 Posts
Newbie-repacker is on a distinguished road
Question Code for Making Circular progress bar(or loading bar) in cmd(Batch or .bat)

Like this is an example of rectangular box

Code:
 @echo off
    color 0A
    
    
    setlocal EnableDelayedExpansion
    set Counter=10
    set Schalter=100
    set Width=100
    
    :1
    set /a Counter=%Counter% + 1
    set /a Display=%Counter% / 2
    FOR /L %%A IN (1,1,%Display%) DO (
       set Display=!Display!█
    )
    cls
    echo     Loading...                  		%Counter%%%
    echo     █!Display:~2,47!
    ping localhost -n 1 >nul
    if "%Counter%" == "93" endlocal & goto End
    goto 1
    
    :End
    cls
And if such is this possible in batch to make circular progress bars??
How to make such with circular progress bar......????

Last edited by Joe Forster/STA; 12-05-2021 at 02:15. Reason: fixed rectangular box character in code
Reply With Quote
Sponsored Links
  #2  
Old 11-05-2021, 13:17
Joe Forster/STA's Avatar
Joe Forster/STA Joe Forster/STA is offline
Senior forum member
 
Join Date: Nov 2000
Location: Hungary
Posts: 9,683
Thanks: 10
Thanked 291 Times in 184 Posts
Joe Forster/STA is on a distinguished road
Quote:
Originally Posted by Newbie-repacker View Post
Like this is an example of rectangular box
And if such is this possible in batch to make circular progress bars??
How to make such with circular progress bar......????
Sorry, that rectangular box doesn't appear correctly in my browser. What do you mean by a "circular progress bar"? Here's a modified version with a rotating hyphen:
Code:
@echo off
color 0A


setlocal EnableDelayedExpansion
set Counter=10
set Schalter=100
set Width=100
set "RotateChars=-\|/"

:1
set /a Counter=%Counter% + 1
set /a Display=%Counter% / 2
set /a RotateIndex=%Counter% %% 4
set "RotateChar=!RotateChars:~%RotateIndex%,1!"
FOR /L %%A IN (1,1,%Display%) DO (
   set Display=!Display!█
)
cls
echo     Loading...                  		%Counter%%% ^%RotateChar%
echo     █!Display:~2,47!
ping localhost -n 1 >nul
if "%Counter%" == "93" endlocal & goto End
goto 1

:End
cls
__________________
Joe Forster/STA
For more information, see the FileForums forum rules and the PC Games forum FAQ!
Don't contact me via E-mail or PM to ask for help with anything other than patches (or software in general) done by me, otherwise your request may be deleted without any reply!
Homepage: http://sta.c64.org, E-mail: [email protected]; for attachments, send compressed (ZIP or RAR) files only, otherwise your E-mail will bounce back!

Last edited by Joe Forster/STA; 12-05-2021 at 02:14.
Reply With Quote
  #3  
Old 11-05-2021, 21:04
Newbie-repacker Newbie-repacker is offline
Banned
 
Join Date: Apr 2021
Location: In My Home Sweet Home
Posts: 27
Thanks: 57
Thanked 0 Times in 0 Posts
Newbie-repacker is on a distinguished road
Looking for something like this in .bat
Not exactly like this but somewhat near to this.......




And u will have to save the above code in a .bat to get progress bar like in attachment
And it will look like this...........

Attached Files
File Type: rar Progress bar.rar (354 Bytes, 11 views)
Reply With Quote
  #4  
Old 12-05-2021, 02:19
Joe Forster/STA's Avatar
Joe Forster/STA Joe Forster/STA is offline
Senior forum member
 
Join Date: Nov 2000
Location: Hungary
Posts: 9,683
Thanks: 10
Thanked 291 Times in 184 Posts
Joe Forster/STA is on a distinguished road
(I fixed the rectangular box character in the code. Make sure to preview your posts. Code pages are tricky.)

You can't draw pictures from batch files. You can work with text. (Well, you can do anything from batch files if you write additional commands in external programs and call them from batch files but what's the point of using a batch file then? This is the same problem as BASIC and machine code on microcomputers: if you understand what BASIC is capable of - pretty much nothing - then the only thing you'll use it for is to start a machine code program. )
__________________
Joe Forster/STA
For more information, see the FileForums forum rules and the PC Games forum FAQ!
Don't contact me via E-mail or PM to ask for help with anything other than patches (or software in general) done by me, otherwise your request may be deleted without any reply!
Homepage: http://sta.c64.org, E-mail: [email protected]; for attachments, send compressed (ZIP or RAR) files only, otherwise your E-mail will bounce back!
Reply With Quote
The Following User Says Thank You to Joe Forster/STA For This Useful Post:
GaMEr_2077 (20-05-2021)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get Percentage in Progress bar with a extraction of a Batch File (.bat) Prince4 Conversion Tutorials 2 04-06-2016 23:23
Announcement and final word on the CheatHappens vs. h4x0r trainer war Joe Forster/STA Game Trainers 7 12-07-2010 09:31
Securom 7 Rebuild anonymous1381 Game Coders 11 15-05-2007 17:48



All times are GMT -7. The time now is 01:49.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com