Sign in to follow this  
Followers 0
Elusid

Net Send function in Autoit?

7 posts in this topic

Alright well I'm trying to make a script that when ran will run a pre-defined net send function. Basically I want it to do the same thing as if you typed this in the cmd prompt

net send * text here

any ideas?

Share this post


Link to post
Share on other sites



Alright well I'm trying to make a script that when ran will run a pre-defined net send function. Basically I want it to do the same thing as if you typed this in the cmd prompt

net send * text here

any ideas?

use this:

#include <Process.au3>
$inp = InputBox('Input', 'messsage to send', '', '', 300, 100, -1, -1)
if @error then Exit
_RunDOS('net send * '& String($inp))
Exit

Share this post


Link to post
Share on other sites

Hm alright. So let's say that I wanted it to send just the sentence "this is a test" and then exit how would I do that? Sorry I'm new to this and it's kind of a bumpy start. I don't want the option to pick what is sent.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Hm alright. So let's say that I wanted it to send just the sentence "this is a test" and then exit how would I do that? Sorry I'm new to this and it's kind of a bumpy start. I don't want the option to pick what is sent.

then this:

#include <Process.au3>
_RunDOS('net send * this is a test')
Exit

PS:Welcome to AutoIt

Edited by Gif

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

thank you =) yeah it seems simple enough

EDIT: Oh wait, I see that it has #include <Process.au3> at the top. What's that do? If I were to compile this into an EXE and move it to a comp that doesn't have the autoit editor on it would it still work?

Edited by Elusid

Share this post


Link to post
Share on other sites

thank you =) yeah it seems simple enough

EDIT: Oh wait, I see that it has #include <Process.au3> at the top. What's that do? If I were to compile this into an EXE and move it to a comp that doesn't have the autoit editor on it would it still work?

yes it will work, you have to include Process.au3 in case you use one of its functions, _RunDOS() is one of them and in order to work you need to include it..

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