Image File Metadata accessibility?

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

SparkOut
Posts: 2862
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Mon Dec 08, 2008 6:25 pm

What happens if you try wrapping the whole (quoted) path and argument string in another set of quotes?

Code: Select all

put shell(quote & quote & "C:/My ExifPath/exiftool" & quote && quote & "C:/Path To My Image.jpg" & quote & quote) into fld "Test"

Zax
Posts: 487
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Post by Zax » Tue Dec 09, 2008 11:47 am

Mark wrote:You might try the shortFilePath function, to replace the file paths you are currently using
You're right: now it works... at least! :)
I didn't know this rev function.

Thanks a lot Mark for all your help.

Now, speaking cosmetic, it's rather annoying with windows to see the console each time I call exiftool with shell. Maybe there is an ExifTool's parameter to correct this but maybe this is due to the OS.

SparkOut
Posts: 2862
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Tue Dec 09, 2008 12:23 pm

Hi Zax

Did it also work if you just wrapped the whole in another pair of quotes, as above? :wink:

And to hide the console window there is another rev command. Before you fire off the shell, use

Code: Select all

set the hideConsoleWindows to true
and you won't see the window.

Zax
Posts: 487
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Post by Zax » Wed Dec 10, 2008 9:32 am

SparkOut wrote:

Code: Select all

put shell(quote & quote & "C:/My ExifPath/exiftool" & quote && quote & "C:/Path To My Image.jpg" & quote & quote) into fld "Test"
RunRev doesn't understand this syntax, even with a simple quote (').

Thanks for the "hideConsoleWindows" property :)

SparkOut
Posts: 2862
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Wed Dec 10, 2008 10:38 am

That's odd. I don't have exiftool to try but this works just fine (and should in theory for all permutations of command line paths with arguments, on Windows XP)

Code: Select all

put shell (quote & quote & "C:/Test Spaces/notepad" & quote && quote & "C:/Test Spaces/test file name with spaces.txt" & quote & quote) into fld "Test"
(I deliberately moved notepad into the test folder.)

What's the error you get with RunRev?

Zax
Posts: 487
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Post by Zax » Wed Dec 10, 2008 3:16 pm

SparkOut wrote:What's the error you get with RunRev?
If I well remember, the generic RunRev syntax error.

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Post by Janschenkel » Thu Dec 11, 2008 6:41 am

You have a pair of quotes too many, and the paths under Windows have to use baclslashes instead of slashes. Try the following:

Code: Select all

put quote & "C:\My ExifPath\exiftool.exe" & quote && quote & "C:\Path To My Image.jpg" & quote into theShellCommand
put shell(theShellCommand) into fld "Test"
HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

SparkOut
Posts: 2862
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Thu Dec 11, 2008 8:56 am

Hi Jan - well under Windows you should use backslashes in the path, but under many (not all) circumstances (at least on my XP system) the path works with forward or backslashes, so I couldn't be bothered to change them in this case.
The extra pair of quotes is to wrap the entire command line instruction including arguments. Because of the spaces in the path and file name, (even using backslashes rather than forward) without that extra pair wrapping the line you get the error:

Code: Select all

'C:\<firstwordofthepathwithspaces>' is not recognized as an internal or external command, operable program or batch file.
Wrapping in an extra pair of quotes solves the issue - at least for me. This is a quirk of Windows, rather than Rev syntax, I think.

Post Reply

Return to “Multimedia”