Sign in to follow this  
Followers 0
rootx

External process OutPut help

1 post in this topic

#1 ·  Posted (edited)

Im note sure... How to...

I would like to run one instance at a time, and write its relative output

 

#include <Array.au3>
#include <File.au3>
#include <MsgBoxConstants.au3>
#include <Date.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
#include <GuiEdit.au3>
#include <FontConstants.au3>
Global $guetzli = @ScriptDir&"\guetzli.exe", $FilePath="C:\Users\rootx\Desktop\guetzli\img\", $val = "85"
RebuildQ($FilePath)
Func RebuildQ($FilePath)

ConsoleWrite('Wait reduction image quality process...'&@CRLF)
$files = _FileListToArrayRec($FilePath,"*.jpg",1,1,1,1)
    $count = 0
    For $q = 1 to UBound($files)-1
        $run = Run($guetzli &" --quality "&$val&" --verbose "&$FilePath&"\"&$files[$q]&" "&$FilePath&"\"&"COPY_"&$files[$q],'',@SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD )
        ConsoleWrite($guetzli &" --quality "&$val&" --verbose "&$FilePath&"\"&$files[$q]&" "&$FilePath&"\"&"COPY_"&$files[$q]&@CRLF)
        $count+=1  
EndFunc

 

Edited by rootx

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