Recent Posts

Pages: [1] 2 3 ... 10
1
Hi guys

I am lost in trying to solve this issue

What Im trying to acheive is to just GPS tag the latest jpg in a directory.

Once that is done I want to remove any other GPS tags from any other images including the previously tagged jpg which has now been superceeded by a newer jpg

Im trying to create a script to do this automatically and any advice or pointers would be great as Im completely stuck at the moment

I know the command to tag but no idea how to go about doing the above

The file are in the format of 20170315 130103.jpg for example

Thanks again

2
Developers / Re: Shell ExifTool from Excel VBA
« Last post by l.willms on Today at 04:11:39 AM »
Maybe this Stackoverflow answer can help?

This is one step forward by using the WScriptShell object, but instead of using the Run method, it would be better to use the WshScriptExec object, because with the Exec method one has also access to the SYSIN, SYSOUT, and SYSERR streams.

The code example from the VBSCript help file for access to the STDERR stream:

Code: [Select]
Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec    = WshShell.Exec("%comspec% /c dire")

Function ReadAllFromAny(oExec)

     If Not oExec.StdOut.AtEndOfStream Then
          ReadAllFromAny = oExec.StdOut.ReadAll
          Exit Function
     End If

     If Not oExec.StdErr.AtEndOfStream Then
          ReadAllFromAny = "STDERR: " + oExec.StdErr.ReadAll
          Exit Function
     End If
     
     ReadAllFromAny = -1
End Function

Dim allInput, tryCount

allInput = ""
tryCount = 0

Do While True

     Dim input
     input = ReadAllFromAny(oExec)

     If -1 = input Then
          If tryCount > 10 And oExec.Status = 1 Then
               Exit Do
          End If
          tryCount = tryCount + 1
          WScript.Sleep 100
     Else
          allInput = allInput & input
          tryCount = 0
     End If
Loop

WScript.Echo allInput
3
Developers / Re: Shell ExifTool from Excel VBA
« Last post by l.willms on Today at 03:59:56 AM »
Maybe this Stackoverflow answer can help?

This is one step forward by using the WScriptShell object, but instead of using the Run method, it would be better to use the WshScriptExec object, because with the Exec method one has also access to the SYSIN, SYSOUT, and SYSERR streams.

An example from the help file for VBScript:

Code: [Select]
Dim WshShell, oExec, input
Set WshShell = CreateObject("WScript.Shell")
Set oExec    = WshShell.Exec("test.bat")
input = ""

Do While True

     If Not oExec.StdOut.AtEndOfStream Then
          input = input & oExec.StdOut.Read(1)
          If InStr(input, "Press any key") <> 0 Then Exit Do
     End If
     WScript.Sleep 100
Loop

oExec.StdIn.Write VbCrLf

Do While oExec.Status <> 1
     WScript.Sleep 100
Loop


Quote
Remarks
The Status property is used when a program is run asynchronously.

Return Values
The Status property returns a value from an enumerated type.

WshRunning ( = 0)
The job is still running.
WshFinished ( = 1)
The job has completed.


Sorry for being late with this, I do not look at this forum every day
4
Developers / Re: Shell ExifTool from Excel VBA
« Last post by Betj on March 22, 2017, 02:58:03 PM »
Thank you very much to all.

Phil, your suggestion works perfect.
I get the right comment in the text file.
5
Developers / Re: Shell ExifTool from Excel VBA
« Last post by StarGeek on March 22, 2017, 01:28:46 PM »
Maybe this Stackoverflow answer can help?
6
Newbies / Re: RegionName and RegionArea fields mismatch
« Last post by stepan on March 22, 2017, 01:20:46 PM »
Yes, that is what I was missing.

Thanks a lot!
7
Newbies / Re: RegionName and RegionArea fields mismatch
« Last post by Phil Harvey on March 22, 2017, 01:03:40 PM »
I'm afraid that you will have to add -struct to the command and parse the structures.

- Phil
8
Newbies / RegionName and RegionArea fields mismatch
« Last post by stepan on March 22, 2017, 12:58:19 PM »
I wrote bash script to crop faces from JPG files exported from Adobe Lightroom.
Calculating of crops positions is OK, but I have problem to get right name because some regions can be unnamed and index of RegionArea is than not matching index in RegionName list.
I am simply calling exiftool img.jpg and then parsing fields by bash and grep.

Code: [Select]
#Region Area H                   : 0.06900, 0.07605, 0.06471, 0.07689, 0.07671, 0.07546
#Region Area W                   : 0.04701, 0.05099, 0.04225, 0.05082, 0.05411, 0.05125
#Region Area X                   : 0.29349, 0.41351, 0.45454, 0.39441, 0.18491, 0.72602
#Region Area Y                   : 0.29258, 0.55951, 0.28005, 0.29191, 0.24728, 0.24704
#Region Name                     : Alice, Bob, Charlie

Is there some way to get names right? For example to get full RegionName list with some values empty?
Or is it problem that data are not written right by Lightroom?

I can bypass this problem by deleting of unnamed faces first, but that would involve working on copy of data, ...
9
Lol; is this CED?
10
Developers / Re: -stay_open
« Last post by Hayo Baan on March 22, 2017, 12:43:42 PM »
The file exists and is correctly filled.
Are you sure that exiftool can open/read a UTF8 txt file ?

Yes, absolutely sure :)

I'm guessing now that you have exiftool look in the wrong location. Try specifying the exact path of the file. Also, as a test, before running the exiftool command, show the content of the file. E.g., with the command type argfile (use cat on a unix system).
Pages: [1] 2 3 ... 10