Sign in to follow this  
Followers 0
igorm

Read from Command Prompt window

4 posts in this topic

#1 ·  Posted (edited)

Hi,

I'm making for my program to be able to create ISO file. For that I'm using mkisofs. I also want to make progress bar. I figured pretty good way for this, using FileGetSize during creating of script, since I know how much total size will be. But progress bar does not update itself very good, because FileGetSize does now want sometimes to update itself. But then I got other idea. When using command prompt with mkisofs, it has built in percent, so I need to read somehow that percent (always from last line) and then to update my progress bar, but I don't know how to do that. So, can someone help me with that? Here is how windows look:

post-27443-1203699606_thumb.jpg

Any help would be appreciated.

Cheers :)

Edited by igorm

Share this post


Link to post
Share on other sites



You could try using StdoutRead, see example in the help file



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

you can use these example...

#include <Constants.au3>

$foo = Run('c:\mkisofs.exe bla bla bla', "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

While 1
    $line = StderrRead($foo)
    If @error Then ExitLoop
    $message = ""
    SplashTextOn("Test", $message, -1, -1, -1, -1, 4, "")
    $message = $message & $line & @LF
    ControlSetText("Test", "", "Static1", $message)
    sleep(100)
Wend

Share this post


Link to post
Share on other sites

Hi,

Thank you for responses. I tried with StderrRead() but when I add $STDERR_CHILD + $STDOUT_CHILD to my run command, CMD windows become unresponsive, it don't display any text and it won't never exit. Any other idea? Or someone maybe know how to refresh some folder, so I can get back to my first idea (since I sow that when I manually refresh folder where ISO is creating ,progress bar update itself regular).

Cheers :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0