exiftool and filemaker pro

Started by rwells1938, January 06, 2013, 04:56:21 PM

Previous topic - Next topic

rwells1938

I am using the following script in filemaker pro 12. My object is to get the creation date of the image.

I have 2 problems..
1.  The preform of the applescript dose not work. The path seems to be OK but maybe not??
2.  Once the preform works how do I get the date into a variable so that it can be written back to the database?

Thanks for any help or direction

Roger

#
#Get proper path for exiftool
Set Variable [ $aPOSIX; Value:RWellsImages::FilePath ]
Set Variable [ $Start; Value:Position($aPOSIX;"/Users";1;1) ]
Set Variable [ $End; Value:Length ( $aPOSIX ) ]
Set Variable [ $Path; Value:Middle ( $aPOSIX ; $Start; $End ) ]
#
#run exiftool
Show Custom Dialog [ Title: "Debug"; Message: RWellsImages::FileName; Default Button: "OK", Commit: "Yes"; Button 2: "Cancel", Commit: "No" ]
#
Perform AppleScript [ Calculated AppleScript: "do shell script \"exiftool -CreateDate -Metadata " & " " & $Path ]

Phil Harvey

Hi Roger,

I can't help much with the filemaker script, but your quoting looks wrong in the applescript call.  You have an escaped quote before "exiftool", but no matching closing quote.

Also, typically one uses "quoted form of posix path" in apple scripts when passing them as command-line arguments.  To debug the problem you could use the exiftool -echo option to echo the path back again to see what it looks like.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).