Jump to content

ConsoleWrite function...


venkatb
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

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