I'm trying to set the default paragraph style to [Basic Paragraph], but this produces an error.
Setting other styles does work, what's wrong with "[Basic Paragraph]"?
tell application "Adobe InDesign CS4"
tell active document
tell text defaults
set applied paragraph style to "[Basic Paragraph]"
I guess that in AS it's the same as in JS: you can't use a string for a paragraph style (not in this case, anyway), you must use an object. In JS:
app.activeDocument.textDefaults.appliedParagraphStyle = app.activeDocument.paragraphStyles.item ("[Basic Paragraph]");
In general it's better to work with style objects rather than with strings: objects always work, strings not.
Yes, this works, thanks!
Alternatively you could use:
set applied character style of text defaults to character style 1
set applied paragraph style of text defaults to paragraph style 1