Keeping objShell open to Exec several tasks
Posted: 11 Jul 2014, 08:36
I have process several files to read their EXIF data. Currently I use a code similar to one that garry had posted:It works so far, but basically for each file a cmd window pops up, disapears and the cmd window for the next files comes up, and so on.
Is there a way to create one cmd window, do all the collection/execution/reading and then close the window? Thus, one window is visible all the time, but at least it is not constantly flickering.
Code: Select all
exiftool = Path to Exiftool
Loop, C:\*
{
objShell := ComObjCreate("WScript.Shell")
objExec := objShell.Exec(ComSpec " /c exiftool " A_LoopFileLongPath)
while, !objExec.StdOut.AtEndOfStream
Exif[A_Index] .= objExec.StdOut.ReadAll()
}
Is there a way to create one cmd window, do all the collection/execution/reading and then close the window? Thus, one window is visible all the time, but at least it is not constantly flickering.