Sign in to follow this  
Followers 0
dash007

Net Send: multiple lines

4 posts in this topic

Hi all,

When you open a command prompt and type

net send username firstline ^T secondline

You get the message in two seperate lines. The '^T' is basically CTRL+T and this inserts a line break.

However when I try inserting this CTRL+T using the SEND keys or even Send("{CTRLDOWN}t{CTRLUP}", it does not seem to work. Somehow instead of inserting a line break, I get the number 1 instead. Has anyone come accross this problem? Thanks in adv. Example is as below:

RunWait(@ComSpec & " /c " & "net send " & guictrlread($sendto) & " " & GUICtrlRead($msg1) & Send("{CTRLDOWN}t{CTRLUP}") & GUICtrlRead($msg2))

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Try using chr(20) instead of the "^T" and it works (had to google in some newsgroups for this one)

$sendto = "user"
$msg1 = "Part1"
$msg2 = "Part2"
$test = "net send " & $sendto & " " & $msg1 & Chr(20) & $msg2
RunWait(@ComSpec & " /c " & $test)

hope this helps,

Marc

edit: strange idea to put a send command into a "run" sequence, by the way... :)

Edited by Marc

It's my job to comfort the disturbed and to disturb the comfortable.
My Projects: Profiler, MakeSFX, UserInfo

Share this post


Link to post
Share on other sites

Marc,

Thank you very much for you help. Its worked on my XP. By any chance do you know if this runs on NT and 2000 as well? I can test it when I go to work, but now I am on a weeks holiday....

gafrost, thanks for the link. I did see it earlier along with few other posts on NetSend. It mentions that you need the latest beta or the stdout function wont work. Unfortunately I cannot find the beta version, so I left it at that. But thanks for pointing me in the right direction.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0