|
-
Dec 11th, 2002, 01:16 PM
#1
Thread Starter
New Member
Not Viewing Net Send "Result Message"
I was wondering how I write code that takes away the message you recieve in DOS when for example writing "net send NiVEN hello".. you get a response that states "The Message was sent to NiVEN".. how do I do to make the program to hide that message?
is it possible?
// fade][NiVEN
fade@quakenet
-
Dec 11th, 2002, 03:15 PM
#2
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 11th, 2002, 03:38 PM
#3
Thread Starter
New Member
where do I place that code line? This is the code which i'm using. where do I place the code you send me?
sprintf(wholeString,"net send %s %s"),user,message;
system(wholeString);
// fade][NiVEN
fade@quakenet
-
Dec 11th, 2002, 06:03 PM
#4
sprintf(wholeString,"net send %s %s > nul:"),user,message;
nul: is a special redirect target in DOS, the same as /dev/nul in UNIX.
Note: this only redirects the standard output. stderr will still be the console, this means error messages will still be written to the DOS window.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 12th, 2002, 09:06 AM
#5
Thread Starter
New Member
i doesnt work. It messes up something concerning the user name. Get an error message about net send not being able to send the message to that alias. and it worked perfectly before adding your code. do you see anything wrong in my code that I should correct?
Code:
#include <iostream.h>
#include <stdlib.h>
#include <stdio.h>
#include <cstdlib>
#include <ctime>
int main()
{
char user[20];
char message[20];
int loops;
char wholeString[250];
cout << "Send To: ";
cin >> user;
cout << "Message (max 20 symbols): ";
cin >> message;
cout << "Send how many times: ";
cin >> loops;
for (int i = 0;i < loops;i++)
{
// Code before change
// sprintf(wholeString,"net send %s %s",user,message);
sprintf(wholeString,"net send %s %s > nul:"),user,message;
system(wholeString);
}
cout << "\n";
return 0;
}
// fade][NiVEN
fade@quakenet
-
Dec 12th, 2002, 10:10 AM
#6
That's strange, it shouldn't happen...
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 12th, 2002, 11:56 AM
#7
Thread Starter
New Member
Have you tested the code i posted?
// fade][NiVEN
fade@quakenet
-
Dec 12th, 2002, 12:43 PM
#8
Thread Starter
New Member
i fixed the problem.. you had out the ")" in the wrong place in the code =). but thanx for your help
// fade][NiVEN
fade@quakenet
-
Dec 12th, 2002, 05:19 PM
#9
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|