There is a script step named copy and performing it will copy the selected text to the clipboard.
But the functions Get ( ActiveSelectionStart ) and Get ( ActiveSelectionSize ) will return the position and size of your current text selection.
So if your field is named pages::pageText
Set Variable [$SelectedText ; value: Middle ( Pages::PageText ; Get ( ActiveSelectionStart ) ; Get ( activeSeletionSize ) ) ]
will copy the selected text to a variable without modifying the current contents of your system clipboard.
I think he's asking for script step to formating (bold, underline, font, etc.) text.
Good point and I can build on my previous answer. There are a number of text formatting functions that you can use with those get functions and the insert calculated result script step to replace selected text with a formatted version of the same text.
Thanks a lot Phil and Mark. You have helped me a lot. Anyway, do you know is it possible to highlight using color other than yellow?
Not as far as I know...