Important: The information in this document is obsolete and should not be used for new development.
ASSetSourceStyles
You can use theASSetSourceStyles
function to set the script format styles used by the AppleScript component to display scripts.
FUNCTION ASSetSourceStyles (scriptingComponent: ComponentInstance; sourceStyles: STHandle): OSAError;
scriptingComponent
- A component instance created by a prior call to the Component Manager function
OpenDefaultComponent
orOpenComponent
(see page 10-4).sourceStyles
- A handle to a style element array defined by the TextEdit data type
TEStyleTable
that defines the nine styles used for different kinds of AppleScript terms. The style for each kind of term should be identified according to the index constants listed forASGetSourceStyles
on page 10-81.DESCRIPTION
TheASSetSourceStyles
function sets the script format styles used to display scripts. If you pass aNIL
handle in thesourceStyles
parameter, the AppleScript component uses its default styles.After you have set the script format styles, you must dispose of the style element array you used to specify them.
RESULT CODES
noErr 0 No error errOSASystemError -1750 General scripting system error badComponentInstance $80008001 Invalid component instance SEE ALSO
For information about theTEStyleTable
array, see Inside Macintosh: Text.