Exiftool.exe does not want to hide

Just starting out? Need help? Post your questions and find answers here.
MrCor
User
User
Posts: 22
Joined: Tue Dec 01, 2015 8:31 pm

Exiftool.exe does not want to hide

Post 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
User avatar
Michael Vogel
Addict
Addict
Posts: 2797
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Exiftool.exe does not want to hide

Post 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
MrCor
User
User
Posts: 22
Joined: Tue Dec 01, 2015 8:31 pm

Re: Exiftool.exe does not want to hide

Post 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
Edmund
New User
New User
Posts: 3
Joined: Mon May 01, 2006 11:25 am

Re: Exiftool.exe does not want to hide

Post 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")
MrCor
User
User
Posts: 22
Joined: Tue Dec 01, 2015 8:31 pm

Re: Exiftool.exe does not want to hide

Post 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
Post Reply