Jump to content

Recommended Posts

Posted

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?

Posted

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
Posted

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.

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

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

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
  • Recently Browsing   0 members

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