| View previous topic :: View next topic |
| Author |
Message |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Mar 05, 2003 11:07 pm Post subject: DOS @CR() |
|
|
OK... I don't know the difference between a "carrier return" and a "line feed."
But that's sort of irrelevant to my question: How, from the command
prompt, can I create a new line? For example, some things (such as
JavaScript), use \n for a new line. What's the equivalent in DOS?  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Mar 05, 2003 11:27 pm Post subject: |
|
|
I'm guessing you mean for a batch file (or command line)?
Use echo dot like this:
echo.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Mar 05, 2003 11:35 pm Post subject: |
|
|
I'm trying from the command prompt (mentioned in first post, 2nd line)
to do something like:
| Code: | | NET SEND localhost LINE 1 echo. LINE2 |
I'm trying to send a NET message (2000, XP) to localhost with multiple
lines. So far, echo. in the command doesn't work.
However, echo. by itself does indeed produce another line.
From VDS it doesn't even work with the following code:
| Code: | | run command /c net send localhost Test@cr()Test |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Mar 05, 2003 11:37 pm Post subject: |
|
|
Aaha! I can get it to work from VDS, but I need to do it with the command
line.
For VDS I can use:
| Code: | | run net.exe send localhost Line 1@cr()Line 2 |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Mar 05, 2003 11:45 pm Post subject: |
|
|
Have ya tried this:
NET SEND localhost LINE 1
NET SEND localhost LINE 2
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Mar 06, 2003 12:39 am Post subject: |
|
|
Yes, but that's basically the same thing as doing something like:
| Quote: | ECHO line 1
ECHO line 2 |
... which will produce two separated lines separated by the command prompt.
Try the following:
| Code: | | run command /c echo TEST 1@cr()TEST 2 |
It should produce two separate but next to each other lines. If I use
echo. it doesn't seem to do anything.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Mar 06, 2003 12:48 am Post subject: |
|
|
Ya can put it in a batch file....
echo line1
echo line2
then run the bat file from the command line...
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Mar 06, 2003 12:51 am Post subject: |
|
|
BTW... WHY are we doin' this anyway...  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Mar 06, 2003 1:01 am Post subject: |
|
|
True, but I am using ECHO as an example. It's the Win 2000/XP NET
command I'm trying to figure out. By using NET SEND localhost MESSAGE
you can send your own computer a message. I'm trying to get more than
one line on the message box and I know it's possible because I'm more
than often targeted with advertising with these sort of messages.
I suppose there's a plus to Windows 95: You don't have to deal with those
annoying Messenger Service boxes advertising.
(I think though that LiquidCode posted an open-source messenger
service disabler.)
I'm doing this because I'm trying to make a front end for this command.
By using the @dlgtext() fuction on the MULTI text box I have it occasionally
trims lines off of the end of the message so I'm looking for an alternative.
It's not really that important, I suppose I am getting off my original idea.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Mar 06, 2003 1:15 am Post subject: |
|
|
Apparently what you need is a CRLF within the string, and I don't
think ya can type that in a single command line from DOS.
Why can't ya use VDS? I still ain't clear on that...
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Thu Mar 06, 2003 1:46 am Post subject: |
|
|
If you want to turn off this messenger service (not msn messenger) go into your SERVICES control panel applet and turn off MESSENGER service. Note this turns off the net send messenger service not msn messenger  |
|
| Back to top |
|
 |
LOBO Valued Contributor


Joined: 14 Mar 2002 Posts: 241 Location: Wilmington, Delaware, USA
|
Posted: Thu Mar 06, 2003 1:56 am Post subject: |
|
|
Prakash,
I don't think FF is trying to get rid of those ad messages but rather mentioning that there has to be a way to make a line break in one DOS command since the ads using the messenger service are doing it.
Mark |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Thu Mar 06, 2003 2:50 am Post subject: |
|
|
I understood the question I was just offering a suggestion to those who are sick of seeing such messages.
Btw if you want to produce correct line ends in files and in netsend use @chr(10)>>
| Code: |
run net.exe send localhost test@chr(10)test@chr(10)hello world
|
works pefectly and produces 3 lines of text
It looks like @cr() uses character 13 rather then 10. |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Thu Mar 06, 2003 2:56 am Post subject: |
|
|
This may not have anything todo with what you're looking for, but...
Try searching the string for @chr(11)@chr(13) if I'm
remembering correctly. I know @chr(13) is a carriage-
return but I'm not sure if @chr(9) or @chr(11) is the
new line character or not. But new lines are a combination
of @chr(13) and one of the other two codes mentioned.
The MS-DOS extended char codes:
| Code: |
KEY VDS VDS
CODE @ALT() @CHR() Character
*************************************
0009 @alt(0009) @chr(09) Tab (I think)
0011 @alt(0011) @chr(11) New-line (I think)
0013 @alt(0013) @chr(13) Carriage return
0032 @alt(0032) @chr(32) Space
.
.
.
|
_________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Mar 06, 2003 3:03 am Post subject: |
|
|
@chr(10) = line feed
@chr(13) = carriage return
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
|