Desktops
Q: Get list of layer names from PSD file.
This the script I am using, it gets a list of the layer names of a PSD file.
I am just trying to find out if the layer contains the named layer "Main Image"
But my logic appears not to be working.
Any ideas please.
set this_item to (choose file with prompt "Choose file to record path name") as string
set nLayersName to my getNameOfLayers(this_item as string)
log nLayersName as text
if "Main Image" is in {(nLayersName as text)} then
display dialog "Do something"
end if
on getNameOfLayers(f)
((do shell script "/usr/bin/mdls -name kMDItemLayerNames " & (quoted form of POSIX path of f)))
end getNameOfLayers
Posted on Mar 11, 2015 4:47 AM
