Jump to content

Recommended Posts

Posted

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

Posted

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

You 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

Posted

#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

Posted

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

Posted

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.

Posted

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

from 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.")

Exit

EndIf

_ArrayDisplay($FileList,"$FileList")

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...