Jump to content
Sign in to follow this  
victor

ConsoleWrite Color

Recommended Posts

victor

Hi ,

I wonder if ConsoleWrite can out put different text color ?

cheer

Share this post


Link to post
Share on other sites
Shaggi

Using SciTE - you can emit "+->!" at a start of a line. If you're working with consoles, use the winapi instead. Or you can check out my sig for a UDF that can do it


Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG

Share this post


Link to post
Share on other sites
victor

Thanks ,

Yes it's for SciTE stdout , I had tried the above code and it seem only the BLUE is working

ConsoleWrite('> = Blue' & @LF)

Share this post


Link to post
Share on other sites
guwguw

Thanks ,

Yes it's for SciTE stdout , I had tried the above code and it seem only the BLUE is working

ConsoleWrite('> = Blue' & @LF)

Try these

ConsoleWrite("> " & @ScriptLineNumber & " makes color BLUE" & @CRLF)
ConsoleWrite("! " & @ScriptLineNumber & " makes color RED" & @CRLF)
ConsoleWrite("- " & @ScriptLineNumber & " makes color ORANGE" & @CRLF)
ConsoleWrite("+ " & @ScriptLineNumber & " makes color GREEN" & @CRLF)

Now I'm wondering if there is a way to color single text (like groups or single words) inside console text ...

Edited by guwguw

Share this post


Link to post
Share on other sites
caleb41610

Thanks ,

Yes it's for SciTE stdout , I had tried the above code and it seem only the BLUE is working

ConsoleWrite('> = Blue' & @LF)

Those will color the entire line. You can't individually color items throughout a single line in the Scite console.

Edited by caleb41610

Share this post


Link to post
Share on other sites
Jos

Now I'm wondering if there is a way to color single text (like groups or single words) inside console text ...

When you mean inside of SciTE's Outputpane then the answer is: No

You are depending on what the lexer in SciTE for the outputpane supports, which is really made to lex the output of compiler programs and automatically does some coloring for warnings and errors.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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  

×