Article View: adobe.scripting.indesign
Article #15800From AppleScript to JavaScript
From: Dave_Saunders
Date: Mon, 17 Nov 2003 21:18
Date: Mon, 17 Nov 2003 21:18
18 lines
1094 bytes
1094 bytes
In AppleScript, I use:
set myStory to parent story of text frame 1 of document 1 whose label
is "MainStory"
To do the same in JavaScript, I use:
myStory = app.documents[0].textFrames.item('MainStory').parentStory;
It has a bass-ackwards feel to it, but it's essentially the same. In both cases, myStory ends up with a reference to the main story of my document, which I've previously identified by labeling one of its text frames "MainStory".
Dave
Technical Details
Message-ID:
<2cce703d.-1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webxShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,a013b37afbc31d97 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-11-17 13:38:17 PST From: Dave_Saunders@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: From AppleScript to JavaScript Message-ID: <2cce703d.-1@webx.la2eafNXanI> Date: Mon, 17 Nov 2003 13:18:08 -0800 Lines: 13 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit