Page 1 of 1
Exiftool.exe does not want to hide
Posted: Tue Dec 01, 2015 8:38 pm
by MrCor
Hi,
I seem to have some troubles getting exiftool.exe to hide.
Here's the lines as I use them.
Code: Select all
parameter$ = "-comment=" + Chr(34) + GetGadgetText(2) + Chr(34) + " " + "-overwrite_original" + " " + Path$(4) + GetGadgetItemText(0, SelectieRegel, 0) + ".jpg"
RunProgram(Path$(1) + "ExifTool.exe", parameter$, "", #PB_Program_Hide)
In spite of the #PB_Program_Hide the console keeps popping up.
Other functions of exiftool work ok and the console is hidden. Just this one refuses to go in hiding.
Must be something wrong with these lines?
Thanks for replies.
__________________________________________________
Code-Tags added
01.12.2015
RSBasic
Re: Exiftool.exe does not want to hide
Posted: Wed Dec 02, 2015 7:42 pm
by Michael Vogel
Try this...
Code: Select all
ExifOut.s=""
ExifApp.s="C:\Program Files (x86)\Media\Photo Tools\GeoSetter\Tools\ExifTool.exe"
parameter$="-comment=" + Chr(34) + "test" + Chr(34) + " " + "-overwrite_original" + " " + "test.jpg"
ExifHandle=RunProgram(ExifApp,parameter$,GetTemporaryDirectory(),#PB_Program_Read|#PB_Program_Open|#PB_Program_Hide)
If ExifHandle
While ProgramRunning(ExifHandle)
If AvailableProgramOutput(ExifHandle)
ExifOut+ReadProgramString(ExifHandle)
EndIf
Delay(10)
Wend
If AvailableProgramOutput(ExifHandle)
ExifOut+ReadProgramString(ExifHandle)
EndIf
Debug "Exitcode: " + Str(ProgramExitCode(ExifHandle))
Debug "**"+ExifOut
CloseProgram(ExifHandle)
EndIf
Re: Exiftool.exe does not want to hide
Posted: Tue Dec 15, 2015 10:56 pm
by MrCor
Works like a charme, tx a lot.
Now I'll go and figure out what makes the difference but you're welcome to give me some backgroundinformation if you will.
Cheers, Cor
Re: Exiftool.exe does not want to hide
Posted: Wed Dec 16, 2015 9:58 pm
by Edmund
Another Option will be Exiftool running in the Background
Code: Select all
EXIFT = RunProgram("exiftool.exe"," -stay_open true -@Exif_Para.txt","",#PB_Program_Open|#PB_Program_Read|#PB_Program_Error|#PB_Program_Hide)
Write all commands to the Parameterfile
Code: Select all
WriteStringN(Parameterfile,"-XMP:Lens<makernotes:LensType")
WriteStringN(Parameterfile,"-LensModel<makernotes:LensType")
WriteStringN(Parameterfile, yourfile2use)
WriteStringN(Parameterfile,"-execute")
and close Exiftoool at the end
Code: Select all
WriteStringN(Parameterfile,"-stay_open")
WriteStringN(Parameterfile,"false")
Re: Exiftool.exe does not want to hide
Posted: Thu Dec 17, 2015 9:01 pm
by MrCor
Tx Edmund.
Exiftools hides nicely using the code above but I'll get into your suggestions.
For now: problem solved and I am not going to change a winning team.
Cheers, Cor