Code: Select all
$doc = Document.active if $doc == undefined exit # exit silently end $selection = $doc.textSelection $paras = $doc.paragraphStyles # $charas = $doc.characterStyles $theStyle = Prompt Options 'Select a style for ¶', '', 'Okay', $paras $theStyle.apply
1. The radio button selection list can be "navigated" only by up/down arrows and does not accept type-ahead to select an item.
The ideal solution would be something along the lines of the Command Palette you can find in several text editors (e.g. Sublime text). Possible to add such an interface element to the ones provided by macro language?
2. I can prepare another macro to assign character style but I would like to make a single macro listing both paragraph and character styles (I wasn't able to concatenate the two arrays defining the style lists). I would really appreciate any help.
Thanks in advance