paragraph style as a condition
Posted: 2015-04-05 15:18:20
In a document myfile I would like to check the paragraph style of the selection. This works fine like so:
Now let‘s say the prompt says
does not work.
Code: Select all
Document.open "~/Documents/myfile"
$doc = Document.active
$sel = $doc.textSelection
$parStyle = $sel.paragraphStyle
prompt $parStyle
How must I formulate a condition: If Paragraph Style is "Normal" then do suchandsuch?Paragraph Style "Normal"
Code: Select all
If $parStyle = "Normal"
do such and such
end