🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #1718

Open Dialog doesn't open files

#1718
From: matt_p_stone
Date: Tue, 27 Jan 2009 23:01
13 lines
1301 bytes
I am using the following to browse for multiple files to open.
var myFileMain = File.openDialog ("Select a file", "Documents:*.indd",false);

However, when I add this line to display the files I get the error "undefined, not an object"
var myLayoutWindow = myDocument.windows.add();

I have even just copied the snippet from the Official Scripting Guide to see if I was causing the error with my first line but I get the same error here for the second line.
var myDocument = app.open(File("/c/myTestDocument.indd"), false);
var myLayoutWindow = myDocument.windows.add();

So I tried switching the first line to true instead of false but then in testing in Indesign I get the message that no documents are open.

Can anyone point out what I am doing wrong?
Technical Details
Message-ID: <59b7b420.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,26a8cc073352501a,start
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
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: Open Dialog doesn't open files
Message-ID: <59b7b420.-1@webcrossing.la2eafNXanI>
Date: Tue, 27 Jan 2009 15:01:24 -0800
Lines: 18
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit