Re: InDesign Paragraph Style Application
Re: InDesign Paragraph Style Application
- Subject: Re: InDesign Paragraph Style Application
- From: Rick Gordon <email@hidden>
- Date: Wed, 15 Jul 2009 02:35:42 -0700
Roy,
To clarify more, nest all the workings within the document scope.
tell application "Adobe InDesign CS4"
tell active document -- or tell document 1
set theStyle to paragraph style "2.kl.normala sen ensalto"
tell paragraph 1 of story 1
apply paragraph style using theStyle without clearing overrides
end tell
end tell
end tell
> >Ha. And if on a hunch I add "of document 1" following the name of the style, it seems to get the style all right but then it says:
>>
>>>Adobe InDesign CS4 got an error: paragraph 1 of story 1 doesn't understand the apply paragraph style message.
That didn't work because you're still letting the application, rather than the document, own the story.
Rick Gordon
------------------
On 7/14/09 at 8:28 PM -0700, Rick Gordon wrote in a message entitled
"Re: InDesign Paragraph Style Application":
>You're addressing the application, not the document.
>
>Rick Gordon
>
>------------------
>
>On 7/15/09 at 4:06 AM +0200, Roy McCoy wrote in a message entitled
>"Re: InDesign Paragraph Style Application":
>
>>Shane Stanley wrote:
>>
>>>On 13/7/09 11:55 PM, "Roy McCoy" <email@hidden> wrote:
>>>
>>>>>Adobe InDesign CS4 got an error: Invalid value for parameter 'using'
>>>>>of event 'apply paragraph style'. Expected paragraph style, but
>>>>>received "3.kl.normala kun ensalto".
>>>
>>>Right: it wants a reference to a style, not just a name. So:
>>>
>>>set theStyle to paragraph style "3.kl.normala kun ensalto"
>>>tell paragraph 1 of story 1
>>>apply paragraph style using theStyle without
>>>clearing overrides
>>>
>>>Using references rather than just names for styles (and things like colors)
>>>is good standard practice, and helps avoid lots of similar problems.
>>
>>Thanks, but still not working. Here's one of the ten at random:
>>
> >tell application "Adobe InDesign CS4"
>> set theStyle to paragraph style "2.kl.normala sen ensalto"
>> tell paragraph 1 of story 1
>> apply paragraph style using theStyle without clearing overrides
>> end tell
>>end tell
> >
>>This gives:
>>
>>>Adobe InDesign CS4 got an error: Can't get paragraph style "2.kl.normala sen ensalto".
>>
>>
> >Ha. And if on a hunch I add "of document 1" following the name of the style, it seems to get the style all right but then it says:
>>
>>>Adobe InDesign CS4 got an error: paragraph 1 of story 1 doesn't understand the apply paragraph style message.
> >
>>And I've got a lot of text here I have to style fast, durn.
>>
>>
>>Thanks,
>>
>>Roy McCoy
>>
>>_______________________________________________
>>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
>
>
>--
>___________________________________________________
>
>RICK GORDON
>EMERALD VALLEY GRAPHICS AND CONSULTING
>___________________________________________________
>
>WWW: http://www.shelterpub.com
> _______________________________________________
>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
--
___________________________________________________
RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________
WWW: http://www.shelterpub.com
_______________________________________________
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