Jump to content

External process OutPut help


 Share

Recommended Posts

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
Link to comment
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
 Share

  • Recently Browsing   0 members

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