dash007 Posted April 8, 2005 Share Posted April 8, 2005 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 More sharing options...
Marc Posted April 8, 2005 Share Posted April 8, 2005 (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 April 8, 2005 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 More sharing options...
GaryFrost Posted April 8, 2005 Share Posted April 8, 2005 Might want to look at the following threadThe new NET SEND, very nice SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
dash007 Posted April 8, 2005 Author Share Posted April 8, 2005 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now