matthewdowney20 0 Posted August 13, 2012 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! Share this post Link to post Share on other sites
JohnQSmith 40 Posted August 14, 2012 Every time you do a "Run(@ComSpec...", it's going to open a new window.To write to the console, look at ConsoleWrite(). As the help file says, you'll have to compile your script as a console application. Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes". Share this post Link to post Share on other sites
matthewdowney20 0 Posted August 14, 2012 Thank you so much! Share this post Link to post Share on other sites