I know that one question was answered to this question, but I just donโt understand how this is done.
I am trying to get the output of a command line program (Aria2 loader) in an HTA script so that it can be parsed, and the percentage of load, file size, etc. can get and update in the DIV dynamically.
Here is the code that I adjusted and try to use, but it just blocks the interface until the end of the command line, and THEN displays all the output, instead of displaying it like when it arrives.
Const WshRunning = 0
Const WshFinished = 1
Const WshFailed = 2
strCommand = "ping.exe 127.0.0.1"
Set WshShell = CreateObject("WScript.Shell")
Set WshShellExec = WshShell.Exec(strCommand)
Do While WshShellExec.Status = WshRunning
window.setTimeOut "", 100
Loop
Select Case WshShellExec.Status
Case WshFinished
strOutput = WshShellExec.StdOut.ReadAll()
Case WshFailed
strOutput = WshShellExec.StdErr.ReadAll()
End Select
Set objItem = Document.GetElementByID("status")
objItem.InnerHTML = "" & strOutput & ""
How can I change this so that it does not block my user interface and capture output and display it in the "status" div when it passes?