Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InDesign



Lewis Kirk wrote: I have a really basic stupid question, but I have looked
at the documentation and tried multiple things, but I still can't figure out
how to select the first paragraph, set its style, and then select the next
paragraph and set it to another style. Nothing seems to understand the
select command or the set selection command. I can set the style with no
problem, its just selecting a paragraph."

First, there's no need to select the paragraph to set its style. All you
need to do is tell the paragraph to apply a style, and you're good to go.
Something like this:

--Assuming that you have a document open, that that document contains
--at least one story, and has a paragraph style "heading"...
tell application "Adobe InDesign CS2"
tell document 1
set myStyle to paragraph style "heading"
tell paragraph 1 of story 1
apply style using myStyle
end tell
end tell
end tell

If you want to select the paragraph, for some reason:

tell application "Adobe InDesign CS2"
tell document 1
select paragraph 1 of story 1
end tell
end tell

Thanks,

Ole

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden
References: 
 >InDesign (From: Lewis Kirk <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.