forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


DOS @CR()
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Mar 05, 2003 11:07 pm    Post subject: DOS @CR() Reply with quote

OK... I don't know the difference between a "carrier return" and a "line feed." Sad

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? Confused

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Wed Mar 05, 2003 11:27 pm    Post subject: Reply with quote

I'm guessing you mean for a batch file (or command line)?

Use echo dot like this:

echo.

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Mar 05, 2003 11:35 pm    Post subject: Reply with quote

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. Confused

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
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Mar 05, 2003 11:37 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Wed Mar 05, 2003 11:45 pm    Post subject: Reply with quote

Have ya tried this:

NET SEND localhost LINE 1
NET SEND localhost LINE 2

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Mar 06, 2003 12:39 am    Post subject: Reply with quote

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. Crying or Very sad

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Mar 06, 2003 12:48 am    Post subject: Reply with quote

Ya can put it in a batch file....

echo line1
echo line2

then run the bat file from the command line... Wink

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Mar 06, 2003 12:51 am    Post subject: Reply with quote

BTW... WHY are we doin' this anyway... Confused
_________________
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
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Mar 06, 2003 1:01 am    Post subject: Reply with quote

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. Wink
(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. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Mar 06, 2003 1:15 am    Post subject: Reply with quote

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... Confused

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Thu Mar 06, 2003 1:46 am    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
LOBO
Valued Contributor
Valued Contributor


Joined: 14 Mar 2002
Posts: 241
Location: Wilmington, Delaware, USA

PostPosted: Thu Mar 06, 2003 1:56 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Thu Mar 06, 2003 2:50 am    Post subject: Reply with quote

I understood the question Smile 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
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Thu Mar 06, 2003 2:56 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Mar 06, 2003 3:03 am    Post subject: Reply with quote

@chr(10) = line feed
@chr(13) = carriage return

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group