Trying to implement a progress bar while Analog loads report

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Hanif
Posts: 2
Joined: 23 Jul 2008 09:48

Trying to implement a progress bar while Analog loads report

#1 Post by Hanif » 23 Jul 2008 09:51

What happens is, "Loading Weekly.." is displayed but is stuck while loading analog's reports. How do I get it to continue to process the rest of the batch while while it is loading analog so my progress bar can be displayed?
This is my batch file:

@echo off
title LOADER
set load=echo Loading Weekly Statistical Reports...

echo wscript.sleep 1000 > wait.vbs
set wait=wscript.exe wait.vbs
c:


%load%
cd c:\Program Files\analog 6.0\
call analog.exe +g"w20080606.cfg" -G +F080706:0001

+T080712:2359
echo 5%%%
%wait%
cls
%load%
echo 10%%%
%wait%
cls
%load%
echo 15%%%
%wait%
cls
%load%
echo 20%%%
%wait%
cls
%load%
echo 25%%%
%wait%
cls
%load%
echo 30%%%
%wait%
cls
%load%
echo 35%%%
%wait%
cls
%load%
echo 40%%%
%wait%
cls
%load%
echo 45%%%
%wait%
cls
%load%
echo 50%%%
%wait%
cls
%load%
echo 55%%%
%wait%
cls
%load%
echo 60%%%
%wait%
cls
%load%
echo 65%%%
%wait%
cls
%load%
echo 70%%%
%wait%
cls
%load%
echo 75%%%
%wait%
cls
%load%
echo 80%%%
%wait%
cls
%load%
echo 85%%%
%wait%
cls
%load%
echo 90%%%
%wait%
cls
%load%
echo 95%%%
%wait%
cls
%load%
echo 100%%%
echo.
echo Completed Loading!
pause
exit

Odder93
Posts: 11
Joined: 15 Jul 2008 12:43
Contact:

#2 Post by Odder93 » 23 Jul 2008 11:15

okay, I can't help you with the main problem... but I can make an improvement for the output thing :wink:

Code: Select all

set /a percentofloading=0
:loop
if %percentofloading%==100 (
goto complete
) else (
cls
%load%
echo %percentofloading% %%%
%wait%
set /a percentofloading=%percentofloading% + 5
)


that's instead of your 400 lines "echo the status" component :D

Hanif
Posts: 2
Joined: 23 Jul 2008 09:48

#3 Post by Hanif » 23 Jul 2008 11:18

thanks for your reply

I'll need the call for the analog.exe and have a progress bar measure how long analog is taking to process the reports from the server logs

Odder93
Posts: 11
Joined: 15 Jul 2008 12:43
Contact:

#4 Post by Odder93 » 23 Jul 2008 11:30

your error is in (just in case you didn't knew):

Code: Select all

call analog.exe +g"w20080606.cfg" -G +F080706:0001

+T080712:2359


and again i have a minor "improvement", I don't if this is useful in any ways, but instead of running a visual basic script, you could use the timeout function silenced...

Code: Select all

set wait="TIMEOUT 1"


this will wait/sleep 1 second... :P

I I have to disappoint you, I can't help with the main-problem :(

traveller
Posts: 2
Joined: 28 Jun 2009 04:52

#5 Post by traveller » 28 Jun 2009 06:03

use
set wait=cscript.exe //nologo wait.vbs
instead of
set wait=wscript.exe wait.vbs

use the START statement rather than the CALL statement if you want to execute other commands while the program is running:
start "" "analog.exe" +g"w20080606.cfg" -G +F080706:0001

Post Reply