Mac OS 9
AppleScript.h File Reference

AppleScript Specific Interfaces. More...

#include <MacErrors.h>
#include <AppleEvents.h>
#include <OSA.h>
#include <TextEdit.h>

Go to the source code of this file.

Enumerations

enum  { typeAppleScript = FOUR_CHAR_CODE('ascr') , kAppleScriptSubtype = typeAppleScript , typeASStorage = typeAppleScript }
 
enum  { kASSelectInit = 0x1001 , kASSelectSetSourceStyles = 0x1002 , kASSelectGetSourceStyles = 0x1003 , kASSelectGetSourceStyleNames = 0x1004 }
 
enum  { kASHasOpenHandler = FOUR_CHAR_CODE('hsod') }
 
enum  {
  kASDefaultMinStackSize = 4 * 1024 , kASDefaultPreferredStackSize = 16 * 1024 , kASDefaultMaxStackSize = 16 * 1024 , kASDefaultMinHeapSize = 4 * 1024 ,
  kASDefaultPreferredHeapSize = 16 * 1024 , kASDefaultMaxHeapSize = 32L * 1024 * 1024
}
 
enum  {
  kASSourceStyleUncompiledText = 0 , kASSourceStyleNormalText = 1 , kASSourceStyleLanguageKeyword = 2 , kASSourceStyleApplicationKeyword = 3 ,
  kASSourceStyleComment = 4 , kASSourceStyleLiteral = 5 , kASSourceStyleUserSymbol = 6 , kASSourceStyleObjectSpecifier = 7 ,
  kASNumberOfSourceStyles = 8
}
 

Functions

OSAError ASInit (ComponentInstance scriptingComponent, long modeFlags, long minStackSize, long preferredStackSize, long maxStackSize, long minHeapSize, long preferredHeapSize, long maxHeapSize)
 
OSAError ASSetSourceStyles (ComponentInstance scriptingComponent, STHandle sourceStyles)
 
OSAError ASGetSourceStyles (ComponentInstance scriptingComponent, STHandle *resultingSourceStyles)
 
OSAError ASGetSourceStyleNames (ComponentInstance scriptingComponent, long modeFlags, AEDescList *resultingSourceStyleNamesList)
 

Detailed Description

AppleScript Specific Interfaces.

Introduced In: AppleScript 1.1
Avaliable From: Universal Interfaces 3.4.1
Copyright: � 1992-2001 by Apple Computer, Inc., all rights reserved

For bug reports, consult the following page on the World Wide Web:

http://developer.apple.com/bugreporter/

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

The specific type for the AppleScript instance of the Open Scripting Architecture type.

◆ anonymous enum

anonymous enum

ComponentCallNow(kASSelectInit, 28); This call can be used to explicitly initialize AppleScript. If it is not called, the a scripting size resource is looked for and used. If there is no scripting size resource, then the constants listed below are used. If at any stage (the init call, the size resource, the defaults) any of these parameters are zero, then parameters from the next stage are used. ModeFlags are not currently used. Errors: errOSASystemError initialization failed These values will be used if ASInit is not called explicitly, or if any of ASInit's parameters are zero:

◆ anonymous enum

anonymous enum
 ComponentCallNow(kASSelectGetSourceStyleNames, 8);
 This call returns an AEList of styled text descriptors the names of the
 source styles in the current dialect.  The order of the names

corresponds to the order of the source style constants, below. The style of each name is the same as the styles returned by ASGetSourceStyles.

 Errors:
 errOSASystemError       operation failed

Elements of STHandle correspond to following categories of tokens, and accessed through following index constants:

Function Documentation

◆ ASGetSourceStyleNames()

OSAError ASGetSourceStyleNames ( ComponentInstance  scriptingComponent,
long  modeFlags,
AEDescList resultingSourceStyleNamesList 
)

ComponentCallNow(kASSelectGetSourceStyles, 4); Errors: errOSASystemError operation failed ASGetSourceStyleNames()

Non-Carbon CFM: in AppleScriptLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ASGetSourceStyles()

OSAError ASGetSourceStyles ( ComponentInstance  scriptingComponent,
STHandle resultingSourceStyles 
)

ComponentCallNow(kASSelectSetSourceStyles, 4); Errors: errOSASystemError operation failed ASGetSourceStyles()

Non-Carbon CFM: in AppleScriptLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ASInit()

OSAError ASInit ( ComponentInstance  scriptingComponent,
long  modeFlags,
long  minStackSize,
long  preferredStackSize,
long  maxStackSize,
long  minHeapSize,
long  preferredHeapSize,
long  maxHeapSize 
)

This selector is used to query a context as to whether it contains a handler for the kAEOpenDocuments event. This allows "applets" to be distinguished from "droplets." OSAGetScriptInfo returns false if there is no kAEOpenDocuments handler, and returns the error value errOSAInvalidAccess if the input is not a context. ASInit()

Non-Carbon CFM: in AppleScriptLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ASSetSourceStyles()

OSAError ASSetSourceStyles ( ComponentInstance  scriptingComponent,
STHandle  sourceStyles 
)

ASSetSourceStyles()

Non-Carbon CFM: in AppleScriptLib 1.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later