I have a script in Photoshop
, but I need one thing. I want to get (parse) the width and height data from a file. How can I do that? File can be txt or xml. I use ExtendScript Toolkit from Photoshop.
if ( activeDocument.width != 100 || activeDocument.height != 100 ) {
displayDialogs = DialogModes.ALL;
activeDocument.resizeImage( 100, 100, 72, ResampleMethod.BICUBIC );
displayDialogs = DialogModes.NO;
}
Thanks for help
2
Answers
I simply want get 2 variables from a file and before code i need var width=(first data in file) and var height=(second data). When i get this i can modifity script to look like:
In your code i have all from that file in one variable "words"
I’m still a bit confused as what you want.
However, you can load in a text file as data into Photoshop with this: