🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #9944

Re: Finding a paragraph style in a text box

#9944
From: Dave_Saunders
Date: Thu, 13 Jul 2006 14:19
14 lines
1367 bytes
I gave up on AppleScript because it just runs my mind around in circles as I try to express stuff. Bearing in mind that JavaScript counts from zero rather than one, in JS, I'd do this:

myStyles = myBox.texts[0].paragraphs.everyItem().appliedParagraphStyle

to get an array of the paragraph styles applied to each paragraph of the text of the box. Then, I'd get the names by iterating through the array myStyles:

for (var j=0; myStyles.length > j; j++) {
myStyleName = myStyles[j].name;
// now I have the name of the style, I can change the applied style of myBox.texts[0].paragraphs[j] to whatever I want based on the name
}

I hope this helps because if I try to write AppleScript I'll confuse you even more.

Dave
Technical Details
Message-ID: <3bc0e373.4@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!news.musoftware.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossing
References: <3bc0e373.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,edce4de98901b55
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Dave_Saunders@adobeforums.com
Newsgroups: adobe.scripting.indesign
Subject: Re: Finding a paragraph style in a text box
Message-ID: <3bc0e373.4@webcrossing.la2eafNXanI>
Date: Thu, 13 Jul 2006 07:19:46 -0700
References: <3bc0e373.-1@webcrossing.la2eafNXanI>
Lines: 20
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!news.musoftware.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossing