Jump to content

Net Send: multiple lines


Recommended Posts

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))

Link to comment
Share on other sites

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

Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL)

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...