Important: The information in this document is obsolete and should not be used for new development.
|
|
Log In | Not a Member? |
Contact ADC |
ASGetSourceStyles
You can use theASGetSourceStylesfunction to get the script format styles currently used by the AppleScript component to display scripts.
FUNCTION ASGetSourceStyles (scriptingComponent: ComponentInstance; VAR resultingSourceStyles: STHandle): OSAError;
scriptingComponent- A component instance created by a prior call to the Component Manager function
OpenDefaultComponentorOpenComponent(see page 10-4).resultingSourceStyles- A handle to a style element array defined by the TextEdit data type
TEStyleTablethat defines the styles used for different kinds of AppleScript terms.DESCRIPTION
TheASGetSourceStylesfunction returns a style element array that defines the nine styles used for AppleScript terms.You can use these index constants to identify individual styles returned in the
resultingSourceStylesparameter:
CONST kASSourceStyleUncompiledText = 0; kASSourceStyleNormalText = 1; kASSourceStyleLanguageKeyword = 2; kASSourceStyleApplicationKeyword = 3; kASSourceStyleComment = 4; kASSourceStyleLiteral = 5; kASSourceStyleUserSymbol = 6; kASSourceStyleObjectSpecifier = 7; kASNumberOfSourceStyles = 8;Other AppleScript dialects may define additional styles. When you have finished using the style element array, you must dispose of it.RESULT CODES
noErr 0 No error errOSASystemError -1750 General scripting system error badComponentInstance $80008001 Invalid component instance SEE ALSO
For information about theTEStyleTablearray, see Inside Macintosh: Text.
Get information on Apple products.
Visit the Apple Store online or at retail locations. 1-800-MY-APPLE Copyright © 2007 Apple Inc. All rights reserved. | Terms of use | Privacy Notice |