🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #15217

Re: Scripting Text

#15217
From: Dave_Saunders
Date: Fri, 12 Dec 2003 13:19
15 lines
1447 bytes
Depends what the script is doing. Some scripts work on paragraph styles, so they can sniff out appropriate paragraphs (by using search & replace). For example (off the top of my head, so it might have an error or three):

myDoc = app.documents[0];
app.findPreferences = null;
app.changePreferences = null;
myPstyle = myDoc.paragraphStyles.item('Name');
myRefs = myDoc.search("", false, false, undefined,{appliedParagraphStyle:myPstyle});

Run this JavaScript and myRefs ends up as a list of references to paragraphs of interest that you can now operate upon.

Sometimes, I label a frame. Sometimes I just rely on the user clicking in the story of interest.

It all depends on what I want to do and the structure of the document (and, perhaps, on whether I'm writing the script for me or for some other user).

Dave
Technical Details
Message-ID: <2ccee47b.0@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2ccee47b.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,7e44b16a18828e29,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-12-12 05:37:42 PST
From: Dave_Saunders@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Re: Scripting Text
Message-ID: <2ccee47b.0@webx.la2eafNXanI>
Date: Fri, 12 Dec 2003 05:19:31 -0800
References: <2ccee47b.-1@webx.la2eafNXanI>
Lines: 23
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit