Echo without newline query



I am using, executed with WSH at a WinXP sp3 command prompt by
CSCRIPT $1.JS,

for (Y=0 ; Y<=6e6 ; Y++) {
// ...
if (Y%1e5 == 0) WScript.echo(Y) // show progress
}

to show progress. Of course, that generates 61 lines on-screen, as the
echo is of "number CR LF". Is there a way of showing progress on one
line? In Pascal, I would use "Write(number, ^M);" where ^M gives CR.

It's a good idea to read the newsgroup c.l.j and its FAQ. See below.

--
(c) John Stockton, nr London UK. ?@merlyn.demon.co.uk IE7 FF2 Op9 Sf3
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
.



Relevant Pages

  • Re: disable many input boxes
    ... While that does sound long, the statement is of little real value ... progress, set a timeout to restart the process, and return. ... TP/BP/Delphi/jscr/&c, FAQ items, links. ...
    (comp.lang.javascript)
  • Re: Echo without newline query
    ... echo is of "number CR LF". ... Is there a way of showing progress on one ... St.substrseemed not to work for me in CScript. ... FAQish topics, links, acronyms ...
    (microsoft.public.scripting.jscript)
  • Re: Echo without newline query
    ... Dr J R Stockton wrote on 17 aug 2008 in microsoft.public.scripting.jscript: ... CSCRIPT $1.JS, ... echo is of "number CR LF". ... Is there a way of showing progress on one ...
    (microsoft.public.scripting.jscript)