Sign in to follow this  
Followers 0
superrune

StdOut question...

2 posts in this topic

Hi,

I'm reinstalling my system, with the usual software upgrades that come with it.

To be up-to-date on everything, I've updated Autoit today, resulting in some scripts not working anymore. No problem, I'll probably fix most of the errors I get. But there was one thing that puzzled med though. These three lines:

$exif = Run("exiftool.exe -t -S -q -f -exposureTime -aperture -iso -canonimagewidth -canonimageheight -colortemperature -datetimeoriginal " & $files[$i] & ".CR2", $folder, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
$stdout = StdoutRead($exif)
$exif = StringSplit($stdout,@TAB)

Now had to be replaced with these lines:

$exif = Run("exiftool.exe -t -S -q -f -exposureTime -aperture -iso -canonimagewidth -canonimageheight -colortemperature -datetimeoriginal XL2N3330.CR2", $folder, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
local $stdout

While 1
    $stdout = StdoutRead($exif)
    If @error Then ExitLoop
    If $stdout <> "" Then 
        $exif = StringSplit($stdout,@TAB)
        ExitLoop
    EndIf
WEnd

There's probably a good reason for it, but for a guy learning to program it seems a bit unneccesary. Or could I be on the wrong track, is there a quicker way to accomplish the same lines of code?

Thanks!

Share this post


Link to post
Share on other sites



I have been working with StdoutRead a lot lately.

The best way to use it is to go strickly by the example at the bottom of the page in the AutoIt help file under StdoutRead - use @Comspec and use TWO loops please.


Das Häschen benutzt Radar

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  
Followers 0