X -
Sorry to bother you, yet again, but seeing as you've put all this work into helping me I want to be able to give a finished script back. For some reason I'm getting a log window but no CSV file. I used it yesterday and I swear it worked. It looks like it produces a logfile when there is no PS7, but I am using CS2.
Color Swatch contact sheet from palette colors
Color Swatch contact sheet from palette colors
The simple fix is to change the
Code: Select allif (isPS7()) {
at the bottom to
Code: Select allif (true) {
Code: Select allif (isPS7()) {
at the bottom to
Code: Select allif (true) {
Color Swatch contact sheet from palette colors
Okay now I get this:
Error 54: Uncaught JavaScript exception: Unable to open /c/workCSwatch.csv.. Line: 694
-> throw "Unable to open" + outfile + "," + outfile.error;
what in god's name am I doing wrong? I think I need to reformat this machine, it's not being cooperative.
when removing that line it says "Color books written to /c/work/CSwatch.csv" but there is nothing there.
Error 54: Uncaught JavaScript exception: Unable to open /c/workCSwatch.csv.. Line: 694
-> throw "Unable to open" + outfile + "," + outfile.error;
what in god's name am I doing wrong? I think I need to reformat this machine, it's not being cooperative.
when removing that line it says "Color books written to /c/work/CSwatch.csv" but there is nothing there.
Color Swatch contact sheet from palette colors
It's a bug/typo. File.open returns false if there was a problem and true if everything was ok. There was a missing '!'.
Code: Select all if (true) {
if (!outfile.open("w")) {
throw "Unable to open " + outfile + ". " + outfile.error;
}
outfile.writeln(outstr);
outfile.close();
alert("ColorBooks written to " + outfile + ".");
} else {
var logwin = new LogWindow("ColorBook " + cb.title);
logwin.append('\r\n' + outstr);
logwin.show();
}
Code: Select all if (true) {
if (!outfile.open("w")) {
throw "Unable to open " + outfile + ". " + outfile.error;
}
outfile.writeln(outstr);
outfile.close();
alert("ColorBooks written to " + outfile + ".");
} else {
var logwin = new LogWindow("ColorBook " + cb.title);
logwin.append('\r\n' + outstr);
logwin.show();
}
Color Swatch contact sheet from palette colors
Great, it's working now. Numbers seem off, but I'll work with it to see if I can fix it. I think I almost have the hang of it.