Have an account? Sign in
"*" indicates required fields
You agree that CreativePro Network may send you emails, including the newsletter selections above. You can unsubscribe at any time.
By signing in, you agree to our Terms of Use and acknowledge our Privacy Notice.
New user? Create an account
By signing in, you agree to our Terms of Use and acknowledge our Privacy Notice.
I had thought the same idea about running script/action in PhotoShop post making the jpegs, so I think that’s the answer!
Thanks for your help (and the initial script too!)
Hi,
Thanks for the posts above, I am a novice in creating scripts and am trying to amend the script so that I can use it to export the files as pngs rather than jpegs. Below is the script I have so far, but it doesn’t seem to save any files. I don’t get an error message however. Any ideas?
Thanks very much in advance!
if (app.documents.length != 0){
var myDoc = app.activeDocument;
MakePNG_FORMATfile();
} else {
alert(“Please open a document and try again.”);
}
function myPS() {
try {
return myDoc.selection[0].appliedParagraphStyle;
} catch (e) {
alert(“Place cursor to text with paragraph style for filenames”);
exit();
}
}
function MakePNG_FORMATfile() {
app.pngExportPreferences.pngQuality = PNGQualityEnum.MAXIMUM;
app.pngExportPreferences.exportResolution = 72;
app.pngExportPreferences.pngExportRange = ExportRangeOrAllPages.exportRange;
app.findGrepPreferences = null;
app.findGrepPreferences.appliedParagraphStyle = myPS();
var f = myDoc.findGrep();
for (var myCounter = 0; myCounter < f.length; myCounter++) {
try {
var curPage = f[myCounter].parentTextFrames[0].parentPage;
if (curPage.appliedSection.name != “”) {
curPage.appliedSection.name = “”;
}
var objName = f[myCounter].contents.replace(/ /g,”_”).toLowerCase();
app.png_formatExportPreferences.pageString = curPage.name;
var myFilePath = myDoc.filePath + “/” + objName + “.png”; //export to a folder of the current document
var myFile = new File(myFilePath);
myDoc.exportFile(ExportFormat.png, myFile, false);
} catch(e) {
//pasteboard?
}
}
}
This site uses cookies, but not the kind you eat. We use cookies to remember log in details, provide secure log in, improve site functionality, and deliver personalized content. By continuing to browse the site, you accept cookies.