-
1. Re: export file info data
d1g1talphyre Aug 8, 2014 9:02 AM (in response to Sam Rutherford)So this is real is. I'm going to give you the code, then record an action to play this javascript file that you copy and past the code into.
you can then run a batch, and
var imageHeight = activeDocument.height var imageWidth = activeDocument.width var imageName = activeDocument.name.toString() var imageDementions = new File ("~/desktop/dementions.txt") imageDementions.open('a'); imageDementions.write(imageName + ", " + imageHeight + ", " + imageWidth + "\n"); activeDocument.close(SaveOptions.DONOTSAVECHANGES) imageDementions.close();that should get you through it. I have functions built to search for files in a folder, then run whatever you want to those files, but just running this script in a batch is much easier.
-
2. Re: export file info data
Muppet Mark Aug 8, 2014 9:06 AM (in response to Sam Rutherford)You've several options available to you… As you have mentioned AppleScript I will start there…
AppleScript has a faceless app called Image Events you can use this to extract the properties you want…
This app just gives you easier access to SIPS you can do shellscript and do this yourself…
Apple has spotlight that will store metadata about your files again you can do shell script with MDLS…
You could AppleScript PhotoShop to open the files but this is a massive waste ( no need to open them ).
Using extendScript again you could use PhotoShop but the same waste wrong tool for the job.
A Bridge script would be better and faster me thinks…
Using shell is super quick… but you need to search else where to get what you need… ( I've pretty much forgotten the bits I knew oops )
-
3. Re: export file info data
Sam Rutherford Aug 8, 2014 2:48 PM (in response to d1g1talphyre)this actually looks kind of promising.
i copied your code into a file i called metadata1.js, and recorded an action that does nothing but open a file and run the script.
i think it worked because the files all closed shortly after they opened. the script must have dine that because it wasn't part of the action.
anyway, i expected the script to create a file on my desktop called dementions.txt.
that didn't happen.
i then created the file myself and ran a batch with the action, hoping the file would have some data in it after the batch completed, but no.
so obviously i'm missing something.
sorry to be such a dolt.
also, can i get a variable for color space?

