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