• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
InDesign: Name of Paragraph Style
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

InDesign: Name of Paragraph Style


  • Subject: InDesign: Name of Paragraph Style
  • From: David Wolfe <email@hidden>
  • Date: Wed, 14 Mar 2007 18:42:20 -0400

So the next bit of my script is to rename every paragraph style to include "SP:" at the front of its name. The code I have so far is:

	repeat with i from 3 to (count of paragraph styles of active document)
		tell active document
			set oldName to name of paragraph style i
			set name of paragraph style i to ("SP:" & oldName)
		end tell
	end repeat

but it seems a bit wonky. I am starting the repeat with 3 to avoid [No Paragraph Style] and [Basic Paragraph]. The script begins renaming paragraph styles. 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?

Thanks for your help,
David Wolfe

_______________________________________________
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
  • Follow-Ups:
    • Re: InDesign: Name of Paragraph Style
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: InDesign: Applied Language Property of Paragraph Style
  • Next by Date: Re: InDesign: Name of Paragraph Style
  • Previous by thread: Re: InDesign: Applied Language Property of Paragraph Style
  • Next by thread: Re: InDesign: Name of Paragraph Style
  • Index(es):
    • Date
    • Thread