Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ilikewater

macrumors newbie
Original poster
Jun 7, 2010
1
0
Hi,

I'm working on a book in inDesign that has a bunch of old character/paragraph styles, which I would like to move into a folder/group called "OldStyles" and then import a new set of styles.

Since I have to repeat this action for every document in the book it gets a bit redundant and I naturally get the urge to automate.

I'm completely new to applescript so I'm very slowly learning as I go. I've managed to tell inDesign to create a style group for me. My issue is, I don't quite know how applescript/inDesign understands styles, and thus I don't know how I would go about "moving" all of them into the new group I've created.

This is what I have so far:

Code:
tell application "Adobe InDesign CS4"
	
	set CurrentDoc to active document
	tell CurrentDoc
		
		
		set NewParent to make new character style group with properties {name:"OldStyles"}
		log NewParent
		
		set AllCharacterStyles to every character style whose name is not "[None]"
		log AllCharacterStyles
		
	end tell
	
end tell

I'd appreciate any help or suggestions :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.