Article View: adobe.scripting.indesign
Article #361JS CS4 Print to postscript
From: John_Kallios
Date: Wed, 25 Mar 2009 05:14
Date: Wed, 25 Mar 2009 05:14
23 lines
1435 bytes
1435 bytes
Part 2 of trying to print to postscript.
Current:
function mySnippet(){
//<fragment>
//Prints the active document using the specified printer preset.
var myDocument = app.documents.item(0);
myDocument.print(true, app.printerPresets.item("ps"));
var printFile = "/Users/john/Desktop/PS_Hotfolder/In/" + myDocument.name;
if(printFile.indexOf(".indd")!=-1){
var myRegularExpression = /.indd/gi
printFile = printFile.replace(myRegularExpression, ".ps");
}
//alert(printFile);
I have verified the preset is activated correctly. With the alert, it has returned the file name I am after.
Where I'm stuck: The next window where to save the postscript file fails for me. No postscript is created nor does it enter the name in the save dialogue for me.
Question: What is the code line to call upon the save dialogue so I may enter the save name?
Thanks in advance
Technical Details
Message-ID:
<59b866b7.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,b0efaf9e920b645e,start X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: John_Kallios@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: JS CS4 Print to postscript Message-ID: <59b866b7.-1@webcrossing.la2eafNXanI> Date: Tue, 24 Mar 2009 22:14:40 -0700 Lines: 28 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit