Hello,
I'm currently working on a console app that should provide some progress output.
It's working with (large) folder structures but what I don't want it to spam the whole console line by line for each folder processed.
Is it possible to just use output a progress report to the first line (of the console), clear that line and use it again when the next progress report is due?
If the output must be wrapped because it's too long, that part would need to be cleared as well...
Go(lang) has a nice library which does it inside the Windows console (https://github.com/vbauerster/mpb) so I guess there is a way in PB, too?
Only use first console line (Windows) to output things?
Re: Only use first console line (Windows) to output things?
Use EnableGraphicalConsole
Code: Select all
If OpenConsole()
EnableGraphicalConsole(1)
ConsoleLocate(0, 0)
Print(Space(80*23))
For i = 0 To 100
ConsoleLocate(0, 0)
Print(Space(80))
ConsoleLocate(0, 0)
Print("Counter " + i)
Delay(50)
Next
ConsoleLocate(30, 10)
PrintN("Press return to exit")
Input()
EndIf
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Only use first console line (Windows) to output things?
It's so easy? Wow...
Thank you mk-soft!
Thank you mk-soft!