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!
set applied paragraph style of paragraph x of parent story of myFrame to paragraph style "Stylesheet Name"