layer Posted July 7, 2005 Posted July 7, 2005 Hey guys... I've never really bothered to look at ConsoleWrite... But I now see a good number of scripts using it to debug or whatnot... But I don't fully understand where something is written to using ConsoleWrite? Could I get a further explanation please? Thanks. FootbaG
w0uter Posted July 7, 2005 Posted July 7, 2005 i think it is STDout. but im not sure. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
layer Posted July 7, 2005 Author Posted July 7, 2005 I don't know, because the help file says:RemarksThe purpose for this function is to write to a console which many popular text editors can read.This does not write to a DOS console.anybody else? FootbaG
w0uter Posted July 7, 2005 Posted July 7, 2005 (edited) console write writes to Scite ... also autoit has the /stdout when it is ran so i guessed Stdout. but yeah i want to know what is can do exept write to scite Edited July 7, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
Valuater Posted July 7, 2005 Posted July 7, 2005 I use it to write to the bottom of my SciTe editor for testing 8)
Valik Posted July 7, 2005 Posted July 7, 2005 Its written to the stdout handle (Simple C printf() call). By default, Windows applications do not have anything which reads their stdout handle. However, most (good) text editors do read the stdout handle of a "tool" they run. That means text editors would be able to see text from AutoIt if it was sent to stdout. ConsoleWrite() is the gateway through which this is achieved.
layer Posted July 7, 2005 Author Posted July 7, 2005 Ohhh... So you have to start the AutoIt script from ScIte in order to see what scite is going to output to you, or what scite has "caught"... Thanks guys, you cleared it up a bunch FootbaG
buzz44 Posted July 7, 2005 Posted July 7, 2005 Alternatively if you don't use SciTe to run your script's (like me) or don't use SciTe at all you can replace ConsoleWrite() with a simple message box. qq
DaveF Posted July 7, 2005 Posted July 7, 2005 A little clarification, in 32-bit Windows any app that you run from the shell (double-click or DOS box) gets assessed by the shell as to whether it's a console app or a GUI app. If it's a GUI app (and any compiled AutoIt3 script is) then its standard input/output pipes get disconnected, Windows making the presumption that you won't need them, even if the app was started from a DOS box. This is why there's no console output from your compiled script if you use ConsoleWrite.If you run your compiled script another way (like from another script using Run() ) that doesn't invoke the shell, then the STDOUT pipe doesn't get disconnected and any output from ConsoleWrite is available for further processing... Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.
Sam Hasler Posted March 22, 2006 Posted March 22, 2006 (edited) Ohhh... So you have to start the AutoIt script from ScIte in order to see what scite is going to output to you, or what scite has "caught"... Thanks guys, you cleared it up a bunch You can get CosnoleWrite output when running from a DOS console but you have to pipe it to another command. I have cygwin installed on my window machine so I just piped it through cat thus:AutoIt3.exe MyScript.au3 | catNote that you have to use @CRLF for line ends.(I realise this is probably too late for the original poster but I leave it here for anyone googling the same problem as I was) Edited March 22, 2006 by Sam Hasler
NextQuestion Posted March 24, 2006 Posted March 24, 2006 (edited) How to display text to the current DOS console, where my au3 is running, like the DIR command do ? I cannot find in the help Edited March 24, 2006 by NextQuestion
Lakes Posted March 24, 2006 Posted March 24, 2006 Any have a list of (simple) text editors that support this? I use MetaPad, because it has a goto line function, don`t want all the extra wizz bang stuff... (yet) 2015 - Still no flying cars, instead blankets with sleeves.
seandisanti Posted March 24, 2006 Posted March 24, 2006 Alternatively if you don't use SciTe to run your script's (like me) or don't use SciTe at all you can replace ConsoleWrite() with a simple message box.what editor do you use?
Valik Posted March 24, 2006 Posted March 24, 2006 How to display text to the current DOS console, where my au3 is running, like the DIR command do ? I cannot find in the helpI want to stab you multiple times. This question has been asked about 403 thousand times. There are at least two work-arounds and the subject is covered in multiple threads. Not only that, but your question is off topic in this thread since it's about ConsoleWrite() and the documentation clearly states that ConsoleWrite() does not output to DOS.
seandisanti Posted March 24, 2006 Posted March 24, 2006 I want to stab you multiple times.i know you don't do this to amuse us valik, but seriously, you are awesome. [/blah] oh yeah and welcome to the forum NextQuestion.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now