Jump to content

Print to command line?


Recommended Posts

Hey everyone,

I am currently in the process of coding a program for command line use, and I want to be abe to print back to the command line, like this:

C:\Users\Matthew>myprogram
Output from my program
C:\Users\Matthew>

Any ideas? Here is what I have already tried: (myprogram.au3)

$MyCommand = 'dir'
Run(@ComSpec & " /c " & $MyCommand, @SystemDir, @SW_Show)
   Run(@ComSpec & " /c @echo off && echo Command completed successfully. && @echo on && pause", @SystemDir, @SW_Show)

The output from this ended up opening three windows, from window 1 (command line) I ran "myprogram" whcih in turn opened another window for the "dir" and yet another window to print back "Command completed successfully." I am looking for a way to do this all in the same window, to write to the active shell so to speak.

Thanks for any help!

Link to comment
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
 Share

  • Recently Browsing   0 members

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