surfer Posted February 7, 2006 Share Posted February 7, 2006 Hello, how is it possible to read for example the dir output at the console? C:\dir list some files and I want check if ther is a specific name on the window or if I execute another program I want read the output. How is this possible I couldn't find some thread or help. Thank a lot Greetings surfer Link to comment Share on other sites More sharing options...
BigDod Posted February 7, 2006 Share Posted February 7, 2006 Hello,how is it possible to read for example the dir output at the console?C:\dirlist some files and I want check if ther is a specific name on the window or if I execute another program I want read the output.How is this possible I couldn't find some thread or help.Thank a lotGreetings surferYou could use the example in the help file for FileFindFirstFile Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
skippynz Posted February 8, 2006 Share Posted February 8, 2006 #include <File.au3> _FileListToArray($sPath [, $sFilter [, $iFlag]]) could you not use this command - which will do your dir /b command and output the info to an array which you can read to see if that value is there then execute the second program Link to comment Share on other sites More sharing options...
surfer Posted February 8, 2006 Author Share Posted February 8, 2006 Hello, my main quetion is how to read something from the console? Thereby should it be possible to use any kind of programs at the console an read its output at the console. Has somebody an hint? Thanks surfer Link to comment Share on other sites More sharing options...
DaveF Posted February 8, 2006 Share Posted February 8, 2006 The beta release version of AutoIt has StdoutRead and StderrRead functions made for reading console output from programs run by AutoIt.You can search this forum for posts about these functions by searching for +stdoutread* 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. Link to comment Share on other sites More sharing options...
Nuffilein805 Posted February 8, 2006 Share Posted February 8, 2006 you could as well write the output to a txt-file c:\dir > output.txt and then read whats in your txt-file maybe that helps you my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
skippynz Posted February 9, 2006 Share Posted February 9, 2006 you could as well write the output to a txt-filec:\dir > output.txtand then read whats in your txt-filemaybe that helps youfrom the helpfile = this does the dir and put the info to an array which you can use or pipe to a text file, save you having to use the dir command#Include <File.au3>#Include <Array.au3>$FileList=_FileListToArray(@DesktopDir)If (Not IsArray($FileList)) and (@Error=1) Then MsgBox (0,"","No Files\Folders Found.") ExitEndIf_ArrayDisplay($FileList,"$FileList") Link to comment Share on other sites More sharing options...
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