Article View: adobe.scripting.indesign
Article #17510Re: This is a bug isn't it?
From: Richard R�nnb�ck
Date: Sat, 31 May 2003 16:30
Date: Sat, 31 May 2003 16:30
37 lines
2488 bytes
2488 bytes
Dave and Shane,
Thank you! You managed not only to only explain what I did wrong, but also
learn me what I think will be a very important distinction. I'm so glad
there are people like you who share your knowledge! (I'm also very pleased
it's not a bug)
For the particular purpose I'm at I'm not sure it can use it though, since
what I actually wanted was the number of paragraphs that use the different
styles and the find method seems to give 1 hit per contiguous chunk of text,
regardless of the number of paragraphs in the chunk. Instead I ended up
with:
tell application "InDesign 2.0.2"
set myDoc to active document
if not (count of stories of myDoc) is 0 then
set myParaStyles to paragraph styles of myDoc
set myParaUse to 0
set myParaUsage to "Antal stycken per styckeformat" & return
repeat with i from 2 to count of myParaStyles
set myCount to count of ((paragraphs of stories of myDoc) whose
applied paragraph style is item i of myParaStyles)
set myParaUse to myParaUse + myCount
set myParaUsage to myParaUsage & (name of item i of
myParaStyles) & tab & myCount & return
end repeat
end if
end tell
It's slower, but it gives what I what. However, I might end up using both
approaches since the above method is an indication of to what extent the
different styles styles are being used, and the find method is an indication
on the amount of labor it takes to apply them.
One really learns a lot from mistakes.
Thank you again.
Technical Details
Message-ID:
<BAFEA55C.1270F%richard.ronnback@telia.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!logbridge.uoregon.edu!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de9585e.-1@WebX.la2eafNXanI> <BAFE0580.5BC26%sstanley@myriad-com.com.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,b348e5a7055ddbc9 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-05-31 09:37:35 PST From: Richard R�nnb�ck <richard.ronnback@telia.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!logbridge.uoregon.edu!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: This is a bug isn't it? Message-ID: <BAFEA55C.1270F%richard.ronnback@telia.com> Date: Sat, 31 May 2003 09:30:52 -0700 References: <1de9585e.-1@WebX.la2eafNXanI> <BAFE0580.5BC26%sstanley@myriad-com.com.au> Lines: 48 User-Agent: Microsoft-Entourage/10.1.1.2418 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit