Copy link to clipboard
Copied
I'd like to be able to run actions in PS based on the ISO number (I know you can do ISO-based processing in Lr — not my goal here).
I know how to run the actions from a script, but not how to get the ISO number...
Doing my homework, I found a handful of threads. Several look daunting, and the few simple ones don't work or are too old...
Who knows the simplest way to just get the ISO number, please? 🙂
if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
var iso = 0
try {
var xmp = new XMPMeta(app.activeDocument.xmpMetadata.rawData);
iso = xmp.iterator(XMPConst.ITERATOR_JUST_LEAFNODES, XMPConst.NS_EXIF, "ISOSpeedRatings").next().value
} catch (e) { }
alert(iso)
Copy link to clipboard
Copied
Example of a simple one that doesn't give me anything... (I'm running it in PS with a pic that does have all the raw settings)...
https://community.adobe.com/t5/photoshop-ecosystem-discussions/help-with-script-to-read-specific-xmp...
Even if it would work, how do I pry out just the ISO number?
-----
Another kinda related one that complains about a missing function...
https://community.adobe.com/t5/photoshop-ecosystem-discussions/setting-xmp-isospeedratings-property/...
Copy link to clipboard
Copied
if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
var iso = 0
try {
var xmp = new XMPMeta(app.activeDocument.xmpMetadata.rawData);
iso = xmp.iterator(XMPConst.ITERATOR_JUST_LEAFNODES, XMPConst.NS_EXIF, "ISOSpeedRatings").next().value
} catch (e) { }
alert(iso)
Copy link to clipboard
Copied
Impressively excellent! Thanks so much, jazz-y 🙂
Copy link to clipboard
Copied
So now you need a conditional framework to run the appropriate action, right? If ISO speed = 200 play action XYZ etc.
Copy link to clipboard
Copied
Indeed. I know how to add that.