Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

AppleScript Pages: How to set "following paragraph style"?

How do you set "following paragraph style" for paragraphs or paragraph styles using AppleScript?


I've tried several approaches, and all cause a run-time gag with the netorious error -10000


More generically, what is the syntax for changing a property of a paragraph style that was user created?


TIA!

MacBook Pro, OS X Mountain Lion (10.8.2)

Posted on Oct 8, 2012 2:23 AM

Reply
Question marked as Best reply

Posted on Oct 8, 2012 10:26 PM

JonRKibler wrote:


How do you set "following paragraph style" for paragraphs

Here's an example that changes the following paragraph style of the first four paragraphs :

-------------

tellapplication"Pages"totellfrontdocument

setfollowing paragraph styleofparagraphs1thru4toparagraph style"Heading 1"

endtell

-------------



JonRKibler wrote:


How do you set "following paragraph style" for paragraph styles using AppleScript?


Here's an example that changes the following paragraph style of the paragraph style "Heading 1" :

-------------

tellapplication"Pages"totellfrontdocument

setfollowing paragraph styleofparagraph style"Heading 1"toparagraph style"Heading 2"

endtell

-------------



JonRKibler wrote:


More generically, what is the syntax for changing a property of a paragraph style that was user created?


If you know the name of the style, here's an example that changes the value of the space before :

-------------

tellapplication"Pages"totellfrontdocument

setspace beforeofparagraph style"xyz"to14

endtell

-------------

1 reply
Question marked as Best reply

Oct 8, 2012 10:26 PM in response to JonRKibler

JonRKibler wrote:


How do you set "following paragraph style" for paragraphs

Here's an example that changes the following paragraph style of the first four paragraphs :

-------------

tellapplication"Pages"totellfrontdocument

setfollowing paragraph styleofparagraphs1thru4toparagraph style"Heading 1"

endtell

-------------



JonRKibler wrote:


How do you set "following paragraph style" for paragraph styles using AppleScript?


Here's an example that changes the following paragraph style of the paragraph style "Heading 1" :

-------------

tellapplication"Pages"totellfrontdocument

setfollowing paragraph styleofparagraph style"Heading 1"toparagraph style"Heading 2"

endtell

-------------



JonRKibler wrote:


More generically, what is the syntax for changing a property of a paragraph style that was user created?


If you know the name of the style, here's an example that changes the value of the space before :

-------------

tellapplication"Pages"totellfrontdocument

setspace beforeofparagraph style"xyz"to14

endtell

-------------

AppleScript Pages: How to set "following paragraph style"?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.