LB Booster
General >> Suggestion Box >> Cannot clear screen in console application http://lbb.conforums.com/index.cgi?board=suggestions&action=display&num=1386566544 Cannot clear screen in console application
Post by XephreWolf on Dec 9th, 2013, 04:22am
One pet peeve I'm having with console applications is that the "cls" command does not function.
For instance, running the following... Code:
print "Line A"
cls
input "Line B"; dummy
end
...produces, as expected, this output in the default mainwin: Code:
Line B
but produces this output when compiled as a console application: Code:
Line A
♀Line B
I was just wondering if there are any plans for fixing this?
Re: Cannot clear screen in console application
Post by Richard Russell on Dec 9th, 2013, 09:21am
I was just wondering if there are any plans for fixing this?
I don't think it would be easy to make CLS work - it sends a chr$(12) (Form Feed) character, and it's up to the receiving end how that is interpreted. The standard Windows console simply displays a symbol.
However you can clear the console screen from a LBB program:
Code:
run "cmd /c cls"
although you will probably want to add a short delay afterwards before sending anything else:
One pet peeve I'm having with console applications is that the "cls" command does not function. I was just wondering if there are any plans for fixing this?
I have recently worked out how this can be achieved, so you can expect a future release of LBB to support CLS in a console application. Thanks for suggesting it.
Edit: CLS in console applications now implemented in LBB v2.53.