I have a JS file that analyses various things about a PSD file. The report it gives is longer than 4 lines, and so can't be printed using Alert.
Is there any way I can either:
a) print a list of text items longer than 4 lines to the screen
b) save out a text file
It has to be PS7 and it has to be JS, unfortunately.
Thanks for any help you can give.
Getting a list of text out of PS7 using Javascript
Getting a list of text out of PS7 using Javascript
Typically, just after posting this question I fixed the bug that was making it look like I couldn't save out text files. So I can do b).
For future reference, I wouldn't mind finding out about a) though, if anyone has some advice.
For future reference, I wouldn't mind finding out about a) though, if anyone has some advice.
Getting a list of text out of PS7 using Javascript
I don't use PS 7 so can't help much. In CS alert will print many lines. Also in CS you can use multi-line edit text to print out lots of info. Can PS7 write files, and execuite files - if so you could write to an external document and open the document.I think working with PS7 is a pretty big obstacle.
Andrew
Andrew
Getting a list of text out of PS7 using Javascript
Use the newline string at the end of each line.
Code: Select allalert("This is the first line" + "\n" +
"This is the second line"+ "\n" );
This works in all versions of Phtoshop scripting.
Larry
Code: Select allalert("This is the first line" + "\n" +
"This is the second line"+ "\n" );
This works in all versions of Phtoshop scripting.
Larry
Getting a list of text out of PS7 using Javascript
Larry,
That's what I tried first but the Alert box only shows the first four lines.
I got round it by writing out a text file, the only problem was, I couldn't get it to auto-execute Notepad, that has to be done manually.
Thanks for your comments, anyway.
That's what I tried first but the Alert box only shows the first four lines.
I got round it by writing out a text file, the only problem was, I couldn't get it to auto-execute Notepad, that has to be done manually.
Thanks for your comments, anyway.
Getting a list of text out of PS7 using Javascript
I've acquired the habit of using '\r\n' for alerts, TextItems and other parts of PS because for some of them it has to be a '\r', which ends up causing problems for me in other places if I don't have a '\n';