Jump to content

Recommended Posts

Posted (edited)

What do you wish to achieve? If you do it my way, then you can have your commands run in cmd. You can get the output using StdoutRead or get it to display in any other GUI element you like.

Edit: And it won't run it in a separate window. You can do it like this:

$a=InputBox("Command","Enter the command") ;Enter command
$b=Run($a,"", @SW_MAXIMIZE, $STDERR_CHILD + $STDOUT_CHILD);run the command
ProcessWaitClose($b); pause until the process completes
$Message = StdoutRead($b, True) ; Read the output
MsgBox(0, "Output", $b) ;Print the output in a message box

 

Edited by pranaynanda
Posted

@pranaynanda - Sorry to disturb you again Pranay.

In the code you have given me will display the output in a msgbox na.......

I want the output too in the same GUI......

That's what am asking.......

Can you help me with this ??

Posted

You wouldn't want $b as the output - Try slightly modified as below.  

#include <AutoItConstants.au3>
#include <MsgBoxConstants.au3>


$a=InputBox("Command","Enter the command") ;Enter command
$b=Run($a,"", @SW_MAXIMIZE, $STDERR_CHILD + $STDOUT_CHILD);run the command
ProcessWaitClose($b); pause until the process completes
$Message = StdoutRead($b, True) ; Read the output
MsgBox(0, "Output", $message) ;Print the output in a message box

 

Quote

I want the output too in the same GUI.....

$message is a variable that you can use in your GUI  (unless I'm completely missing what you want)

 

 

[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

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