![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | wscript.echo only a new line / embed a "CR" in a text string ? How can I output a simple new line CR in an existing wscript.echo command? Ok, I could write: wscript.echo "my output text" wscript.echo But isn't there a shorter way similar to "C": wscript.echo "my output text\n" or wscript.echo "my output text" & CR ....which adds a second, additional new line CR at the end (so that a blank line is generated)? Jerome |
My System Specs![]() |
| | #2 (permalink) |
| | Re: wscript.echo only a new line / embed a "CR" in a text string ? "Jerome Biau" <j.biau@xxxxxx> wrote in message news:49d20bce$0$31332$9b4e6d93@xxxxxx-online.net... Quote: > How can I output a simple new line CR in an existing wscript.echo command? > > Ok, I could write: > > wscript.echo "my output text" > wscript.echo > > But isn't there a shorter way similar to "C": > > wscript.echo "my output text\n" > > or > > wscript.echo "my output text" & CR > > ...which adds a second, additional new line CR at the end (so that a blank > line is generated)? > > Jerome > LF = chr(10) wscript.echo "Hello world", LF |
My System Specs![]() |
| | #3 (permalink) |
| | Re: wscript.echo only a new line / embed a "CR" in a text string ? "Pegasus [MVP]" <news@xxxxxx> wrote in message news:ukv0V4fsJHA.2368@xxxxxx Quote: > > "Jerome Biau" <j.biau@xxxxxx> wrote in message > news:49d20bce$0$31332$9b4e6d93@xxxxxx-online.net... Quote: >> How can I output a simple new line CR in an existing wscript.echo >> command? >> >> Ok, I could write: >> >> wscript.echo "my output text" >> wscript.echo >> >> But isn't there a shorter way similar to "C": >> >> wscript.echo "my output text\n" >> >> or >> >> wscript.echo "my output text" & CR >> >> ...which adds a second, additional new line CR at the end (so that a >> blank line is generated)? >> >> Jerome >> > Try this: > > LF = chr(10) > wscript.echo "Hello world", LF wscript.echo "Hello world", vbCRLF wscript.echo "Hello world", vbCR wscript.echo "Hello world", vbLF wscript.echo "Hello world", vbNewLine and you don't even have to assign those values as they are constants pre-defined by vbscript. /Al |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Can Wscript catch the MS Word Application Event "DocumentBeforePrint" ? | VB Script | |||
| Chomp Echo String; No New Line Please! | VB Script | |||
| WScript.Echo | VB Script | |||
| How to change permanently the "Text Size" under "View"? | Vista mail | |||
| Embed "Phone Call" button in a web page | Live Messenger | |||