Sign in to follow this  
Followers 0
AppleHead

Having problems creating an output that depends on a users inputted data

3 posts in this topic

Hi,

I am trying to get this work in vain...I dont understand the scripting too well however and just cannot get this fundamental bit to work.

I am trying to create a script which will bring up a gui...on the bottom of the Gui is an input box where you can input a computer hostname.

I want to be able to put in a hostname in the input box...and when one of the buttons are clicked...it runs a DOS command of my choice (ie PING <hostname>) or the button will Open a DOS window and do a SEND command so the dos command is actually typed into the DOS window itself enabling the user to see the input and output results of the DOS command. Obviously, the variable <hostname> within the DOS command will be the hostname that has been typed into the input box.

I have a second input box for second variable so a command will run such as: PSKILL \\<hostname> <application to kill>

I'just cannot get this to work and I dont understand it. I am sure it has something to do with variables. I have tried and tried to do the SEND command where it will sent a text which includes the data typed into the INPUT box. Just cannot do it.

I would really appreciate it if someone can help me on this, I have the need to create more scripts on whose outputs are based on what is typed witin a input box.

What I have done so far is attached. The script does require the install of PSTools in c:\temp\ps\ for this to work.

Thankyou for your help.

PSTools Gui.au3

Share this post


Link to post
Share on other sites



Welcome to the forum.

try:

Send('psloggedon \\' & $input)

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Welcome to the forum.

try:

Send('psloggedon \\' & $input)

Hi there, thanks for the response, I tried that...it got further but it did not work...

it comes out with something strange...the CMD window opens, but instead of it typing:

psloggedon \\<hostname from input box>

it actually types:

pslogged \\12

More help needed please.

ThanksPSTools Gui.au3

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