I've been trying to apply paragraph style sheets using AppleScript, but nothing I try works the way I expect it.
Here's what I'm trying:
apply paragraph style using paragraph style "Stylesheet Name" of paragraph x of parent story of myFrame with clearing overrides
but no formatting is applied to the paragraph. As far as I can tell, I'm following the specifications in the dictionary, but am not getting the results I expect.
I know this much -> . <- about AppleScript, but I *do* know it's based on regular English.
Are you sure the syntax in "paragraph style "Stylesheet Name" OF paragraph x" describes what you want to do?
Uh, wait. Perhaps you should explain what you want to do first.
Is it, perchance, apply "the applied paragraph style of paragraph x to paragraph y"?
(My comment above was because I thought you meant "TO".)
I think I figured out what's happening. I think it's a difference between the way QuarkXPress (where these scripts are coming from) handles words vs. punctuation and the way InDesign (where these scripts are being rewritten for) does.
For example, I'm testing for a day of the week as the first word in a paragraph and then applying a stylesheet for a "calendar date" to that paragraph. Using the dateline "TUESDAY, JUNE 12" as a reference point, QuarkXPress sees word 1 as "TUESDAY" but InDesign sees word 1 as "TUESDAY,"
That comma is a small difference, but makes all the difference between a whole head of haid and a bald one!
Europe, Middle East and Africa