GetSelectionStyle()

Syntax:

textObject.GetSelectionStyle()

Return:

A new object with some of the following properties. A property is only present within the object if it is consistently used across the whole selection. For example, if a word in bold is selected the bold property is true, if a word in plain text is selected the bold property is false, and if two words, one bold and the other plain, are selected then the bold property is not present. The object properties are:

bold - true if the text is bold. Otherwise false.

italic - true if the text is italic. Otherwise false.

underline - true if the text is underlined. Otherwise false.

subscript - true if the text is in subscript. Otherwise false.

superscript - true if the text is in superscript. Otherwise false.

fontname - The name of the font face.

fontsize - The size of the font in points.

fontaspect – The aspect of the font in integers.

colour - The colour of the text in RGB values as a string e.g. "00FF00".

backgroundcolour - The colour of the background of the text in RGB values as a string, or the string "transparent".

shadowcolour - The colour of the shadow of the text in RGB values as a string, or the string "none".

Remarks:

No parameters required for this function. A new object that contains the properties outlined above. This function can be used to determine the style of one Text object that can then be applied to a different Text object using the SetSelectionStyle function so that both Text objects have the same format.

see also:GetSelectionParagraphStyle and SetSelectionParagraphStyle

image\Script_Button.jpgExamples