Article View: adobe.scripting.indesign
Article #1746Re: Open Dialog doesn't open files
From: matt_p_stone
Date: Wed, 28 Jan 2009 18:03
Date: Wed, 28 Jan 2009 18:03
24 lines
2141 bytes
2141 bytes
Hi Dave & Olav,
First to Dave; quote is below. From page 12.
You can choose to prevent the document from displaying (i.e., hide it) by setting the showing window
parameter of the open method to false (the default is true). You might want to do this to improve
performance of a script. To show a hidden document, create a new window, as shown in the following
script fragment (from the OpenDocumentInBackground tutorial script):
//Opens an existing document in the background, then shows the document."
//You�ll have to fill in your own file path."
var myDocument = app.open(File("/c/myTestDocument.indd"), false);"
//At this point, you could do things with the document without showing the"
//document window. In some cases, scripts will run faster when the document"
//window is not visible."
//When you want to show the hidden document, create a new window."
var myLayoutWindow = myDocument.windows.add();
Second for Olav,
In actuality I changed the "myTestDocument.indd" to an actual file and I did try changing the false to true (didn't try omit even though I know that it will default to true).
The error message occurs when the next line executes. Error "No Documents are open". The snippet Dave gave above fixed the problem, but it would seem from the documentation that the above solution should work as well.
I hope this is clear enough. Not really a big deal for me at this point since Dave's solution worked, just wanted to know if I was missing something major in interpretation.
Thank you both for your time and expertise.
Technical Details
Message-ID:
<59b7b420.6@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b7b420.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,26a8cc073352501a X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII From: matt_p_stone@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: Open Dialog doesn't open files Message-ID: <59b7b420.6@webcrossing.la2eafNXanI> Date: Wed, 28 Jan 2009 10:03:52 -0800 References: <59b7b420.-1@webcrossing.la2eafNXanI> Lines: 37 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit