🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #20387

Re: Dave Saunders' Running Heads Script

#20387
From: Peter Boctor
Date: Sun, 28 Jul 2002 21:12
23 lines
2296 bytes
Jay, 

 1) Is there any way to determine, by just looking at a ID document, what is "text frame 1"? Is it the first created, the one on the bottom, or just randomly selected?   

All page items, including text frames are ordered in front to back order. So "text frame 1" will always be the frontmost text frame. 

 2) Can you manually label a text frame? IOW, if I could name one text frame "dontTouch" and call the other "thisOne" while I was composing the page, then some things would be a lot easier to script.   

Page items have a "label" property. You can set that property using either the Script Label palette or from scripting. Once the label of a page item is set, you can refer to it by name. For example: 

tell application "InDesign 2.0.1"
     tell document 1
          set myFrame to make text frame with properties {geometric bounds:{0, 0, "1in", "1in"}}
          set label of myFrame to "headline"
          set contents of text frame "headline" to "This is the headline"
     end tell
end tell 

 3) When a script calls for "page 1" is that literally "page 1" or is it the first page of the document? My document starts at page 17; so is that "page 1" or is it "page 17"?   

Page 1 is always the first page in the document, regardless of the page number. To refer to pages by number, you can use their number as their "name". For example, if a page has a the number 17, then you can refer to it as: page "17". 

-peter
Technical Details
Message-ID: <ef9de98.8@WebX.aaQKaf7vad4>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-01!sn-xit-04!supernews.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.online.be!oleane.net!oleane!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <ef9de98.-1@WebX.aaQKaf7vad4>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,37e35bfe49790ac7
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-07-28 14:42:56 PST
From: "Peter Boctor" <peter.boctor@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-01!sn-xit-04!supernews.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.online.be!oleane.net!oleane!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Dave Saunders' Running Heads Script
Message-ID: <ef9de98.8@WebX.aaQKaf7vad4>
Date: Sun, 28 Jul 2002 14:12:53 -0700
References: <ef9de98.-1@WebX.aaQKaf7vad4>
Lines: 33
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit