< Previous PageNext Page > Hide TOC

Deprecated Open Scripting Architecture Functions

A function identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in Mac OS X v10.5

ASGetSourceStyles

Gets the script format styles currently used by the AppleScript component to display scripts. (Deprecated in Mac OS X v10.5. Use ASGetSourceStyleNames instead.)

OSAError ASGetSourceStyles (
   ComponentInstance scriptingComponent,
   STHandle *resultingSourceStyles
);

Parameters
scriptingComponent

A component instance created by a prior call to the Component Manager function OpenDefaultComponent or OpenComponent.

resultingSourceStyles

A pointer to a handle to a style element array defined by the TextEdit data type TEStyleTable that defines the styles used for different kinds of AppleScript terms.

Return Value

A result code. See “Result Codes.”

Discussion

The ASGetSourceStyles function returns a style element array that defines the styles used for AppleScript terms. You can use the index constants described in “Source Style Constants” to identify individual styles returned in the resultingSourceStyles parameter. Other AppleScript dialects may define additional styles. When you have finished using the style element array, you must dispose of it.

Availability
Declared In
AppleScript.h

ASSetSourceStyles

Sets the script format styles used by the AppleScript component to display scripts. (Deprecated in Mac OS X v10.5. Use ASSetSourceAttributes instead.)

OSAError ASSetSourceStyles (
   ComponentInstance scriptingComponent,
   STHandle sourceStyles
);

Parameters
scriptingComponent

A component instance created by a prior call to the Component Manager function OpenDefaultComponent or OpenComponent.

sourceStyles

A handle to a style element array defined by the TextEdit data type TEStyleTable that defines the styles used for different kinds of AppleScript terms. The style for each kind of term should be identified according to the index constants listed in “Source Style Constants.”

Return Value

A result code. See “Result Codes.”

Discussion

The ASSetSourceStyles function sets the script format styles used to display scripts. If you pass a NULL handle in the sourceStyles 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.

Availability
Declared In
AppleScript.h

OSAGetAppTerminology

Gets one or more scripting terminology resources from the specified file. (Deprecated in Mac OS X v10.5. Use OSACopyScriptingDefinition instead.)

OSAError OSAGetAppTerminology (
   ComponentInstance scriptingComponent,
   SInt32 modeFlags,
   FSSpec *fileSpec,
   short terminologyID,
   Boolean *didLaunch,
   AEDesc *terminologyList
);

Parameters
scriptingComponent

Identifies the current scripting component. See the Component Manager documentation for a description of the ComponentInstance data type.

modeFlags

Information for use by the scripting component. No mode flags are applicable for this function, so pass the value kOSAModeNull.

fileSpec

Specifies the file to search. See the File Manager documentation for a description of the FSSpec data type.

terminologyID

A dialect code obtained from a previous call to the OSAGetDialectInfo function or the OSAGetCurrentDialect function.

didLaunch

On return, has the value true if the application's scripting size resource or plist flags indicate that it has a dynamic terminology (in which case, the application will have been launched).

terminologyList

On return, a descriptor list containing zero or more terminology resources. See Apple Event Manager Reference for a description of the AEDesc data type.

Return Value

A result code. See “Result Codes.”

Availability
Declared In
ASDebugging.h

< Previous PageNext Page > Hide TOC


© 1993, 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-05-07)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.