Jump to content
Sign in to follow this  
venkatb

ConsoleWrite function...

Recommended Posts

venkatb

Hi ...friends...what is the purpose of "ConsoleWrite" function. I have an AUTOIT program and in that i have this function. But i could not understand what this function does. This function is writing to console...some text string. But i want to see the string. Cann some body provide a clue for this... Thank You...

Share this post


Link to post
Share on other sites
martin

Hi ...friends...what is the purpose of "ConsoleWrite" function. I have an AUTOIT program and in that i have this function. But i could not understand what this function does. This function is writing to console...some text string. But i want to see the string. Cann some body provide a clue for this... Thank You...

The output from console write can be read by a program which reads data on STDOUT. If you use SciTE (highly recommended) as your text editor then it will show the output and it is very useful for debugging.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
venkatb

The output from console write can be read by a program which reads data on STDOUT. If you use SciTE (highly recommended) as your text editor then it will show the output and it is very useful for debugging.

Can You please make it more clearer...

Share this post


Link to post
Share on other sites
BrettF

That is pretty clear to me... ;)

Take a look here for infomation on STDOUT streams. http://en.wikipedia.org/wiki/Standard_streams

SciTe is the best editor around for AutoIt V3. Also includes many important features that help coding. The slim version is included with AutoIt but the full version is better. Get the latest Full version here. http://www.autoitscript.com/autoit3/scite/downloads.shtml

After you've done that, copy the following script into Scite, and run it by presisng F5.

$msg = MsgBox (3, "Title", "Press a button, and see what the console outputs!")

Switch $msg
    Case 6
        ConsoleWrite ("DEBUGGING EXAMPLE: MsgBox() Returned " & $msg & " (Yes)" & @CRLF)
    Case 7
        ConsoleWrite ("DEBUGGING EXAMPLE: MsgBox() Returned " & $msg & " (No)" & @CRLF)
    Case 2
        ConsoleWrite ("DEBUGGING EXAMPLE: MsgBox() Returned " & $msg & " (Cancel)" & @CRLF)
EndSwitch

Have a look in the console pane (the edit control at the bottom of your window). You should see a line of text saying what button was pressed. :D

Cheers,

Brett

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.