Get ( SelectionStart ) and Get ( SelectionSize ) can determine what text is selected. Middle is a function that can be used to return the value of the selected text. Either set field or Insert Calculated Result can be used to modify the selected text such as replacing the text with the same text but with an applied text stype. (TextStyleAdd).
Still having some difficulties. This is the script I have so far..
Set Selection [Start Position : TextStyleAdd ( Get(ActiveSelectionSize) ; Bold)]
I think the issue is with the "bold" part, but I'm not sure where to find the exact command.