Re: InDesign: Name of Paragraph Style
Re: InDesign: Name of Paragraph Style
- Subject: Re: InDesign: Name of Paragraph Style
- From: Shane Stanley <email@hidden>
- Date: Thu, 15 Mar 2007 09:48:13 +1100
- Thread-topic: InDesign: Name of Paragraph Style
On 15/3/07 9:42 AM, "David Wolfe" <email@hidden> wrote:
> But as they are renamed, they are pushed
> down the list alphabetically, then "reprocessed" resulting in several
> of the paragraph styles in the middle of the list with new names like
> "SP: SP:" and "SP: SP: SP: SP:", and some others not being renamed
> because the counter runs out. Any ideas what I'm doing wrong?
Get all the names at once, and loop through them -- that'll be quicker, too.
tell active document
set oldNames to name of paragraph styles 3 thru -1
repeat with i from 1 to (count of oldNames)
set oldName to item i of oldNames
set name of paragraph style oldName to ("SP:" & oldName )
--
Shane Stanley <email@hidden>
AppleScript Pro Denver, June 2007 <http://scriptingmatters.com/aspro>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden