Hi all,
I have just spent the day trying to use Exiftool from a Livecode application. I now suspect that there is a flaw in my understanding of how "things" should be working so am asking for my home work to be marked.
I am writing in Livecode v10 running on a mac M2 under OS Sonoma. Exiftool is a well established command line tool written by Phil Harvey see https://exiftool.org/install.html . I have installed the latest version on my mac and am able to access it using the terminal and the default zsh. So far so good.
My longterm goal is to include Exiftool with built versions of my application so I copied the Exiftool folder into my project folder with the intention of using the standalone settings copy file/folders once I come to build the application. However, while I am working on it I want to be able to run tests so need to have it access Exiftool from the IDE.
Its worth looking at and extract from the Readme that comes with Exiftool:
My test application has a stack with three fields and a button. The fields are names Path, Command and Result. The button has the only code which is here:I am aware that shell commands are sensitive to illegal characters in file paths and I have tried wrapping path in single/ double quotes. At times the IT variable is being set to 255 which suggests an error yet the "the result" remains empty.
I am wondering if I have either misunderstood how I should be accessing Exiftool from the IDE or that there is some obscure permissions issue that is not being reported back.
Any thoughts?
S
I have just spent the day trying to use Exiftool from a Livecode application. I now suspect that there is a flaw in my understanding of how "things" should be working so am asking for my home work to be marked.
I am writing in Livecode v10 running on a mac M2 under OS Sonoma. Exiftool is a well established command line tool written by Phil Harvey see https://exiftool.org/install.html . I have installed the latest version on my mac and am able to access it using the terminal and the default zsh. So far so good.
My longterm goal is to include Exiftool with built versions of my application so I copied the Exiftool folder into my project folder with the intention of using the standalone settings copy file/folders once I come to build the application. However, while I am working on it I want to be able to run tests so need to have it access Exiftool from the IDE.
Its worth looking at and extract from the Readme that comes with Exiftool:
I have followed these instructions and they work from the terminal but I get nothing when running in the IDE.The exiftool script is a command line application. You run it by typing
commands in a terminal window. The first step is to determine the name of
the directory where you downloaded the ExifTool distribution package.
Assuming, for example, you downloaded it to a folder called "Desktop" in
your home directory, then you would type the following commands in a
terminal window to extract and run ExifTool:
cd ~/Desktop
gzip -dc Image-ExifTool-13.12.tar.gz | tar -xf -
cd Image-ExifTool-13.12
./exiftool t/images/ExifTool.jpg
My test application has a stack with three fields and a button. The fields are names Path, Command and Result. The button has the only code which is here:
CODE:
on mouseUp pMouseButton put empty into field "Report" put field path into tPath --set the defaultfolder to tPath set the shellcommand to tPath ## Read in the text of the shell command put field "command" into tCommand /* test code that issues a standard terminal command and works */ --set the shellcommand to "/bin/sh" --put "say hello from Live code" into tCommand put shell(tcommand) into tResult put "The full command is :" & cr & tCommand & cr & cr after field "report" put "Returns :" & cr & tResult & cr after field "report" put "'It' is set to: " & it after field "report" put cr & the result after field "report" end mouseUp
I am wondering if I have either misunderstood how I should be accessing Exiftool from the IDE or that there is some obscure permissions issue that is not being reported back.
Any thoughts?
S
Statistics: Posted by Simon Knight — Fri Jan 17, 2025 5:25 pm