Jump to content

Read percentage


 Share

Recommended Posts

Hi Guys

Im using the following code to create an iso however i have no idea how long it will take as there is no screen or information. Is there anyway to read the information and display it?

$doscommand = ('mkisofs.exe -l -J -r -V "APHC" -o "' & @DesktopDir & '\APHC.iso" ' & '"' & @ScriptDir & '"')
    MsgBox(64,"Information","This will create an iso called APHC.iso in the following directory " & @DesktopDir)
    _RunDOS($doscommand)

thnaks for all your help

Drunken Frat-Boy Monkey Garbage

Link to comment
Share on other sites

There is no need to use _RunDOS.

Just use Run with the Show-Flag @SW_HIDE and the flags to enable StdoutRead

$pid = Run("mkisofs.exe ...", "", @SW_HIDE, 0x8) ; 0x8 = $STDERR_MERGED (StdOutRead receives Stdout and stderr)
$sOutput = ''
While 1
    Sleep(50)
    $sRead = StdoutRead($pid)
    If @error <> 0 Then ExitLoop
    $sOutput &= $sRead
    ToolTip($sOutput)
WEnd
StdioClose($pid)
ToolTip("")
MsgBox(0, 'Finished', $sOutput)

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Wow brilliant thanks ill try that solution soon. Just for my knowledge, i know understand your method will enable the stdout to be read but whats the difference between your method and the rundos method. whats rundos better used for?

thanks again

Drunken Frat-Boy Monkey Garbage

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...