Jump to content

How to display text on command prompt.


omi
 Share

Recommended Posts

Be a little more descriptive, Omi... :P

You could run a command through command prompt and have it output to a file, rather than the console. Then you can read that file and continue.

The below example runs the "dir" command and displays it in a MsgBox().

Run(@ComSpec & " /c " & 'Dir > ' @ScriptDir & "\output.txt", "", @SW_HIDE)
$Output = FileRead(@ScriptDir & "\output.txt")
MsgBox(0,"CMD Output",$Output)

 

Try searching the forums, for alternative methods, as they do exists already.

If that isn't what you were talking about, and you want to display text 'INSIDE' the windows console window, use a .bat file, as that will be easier...
 

@Echo off
Color 02
Echo 'Text inside console'

If you're trying to simply show the user text through your CLI AutoIt script, then you can just use

ConsoleWrite("Hello World!" & @CRLF)

The @CRLF causes the new ConsoleWrite to write to a new line. Carriage Return + Line Feed. Edited by BinaryBrother

SIGNATURE_0X800007D NOT FOUND

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