Mac OS 9
OSA.h File Reference

Open Scripting Architecture Client Interfaces. More...

#include <MacErrors.h>
#include <AppleEvents.h>
#include <AEObjects.h>
#include <AEInteraction.h>
#include <Components.h>

Go to the source code of this file.

Data Structures

struct  StatementRange
 

Macros

#define NewOSACreateAppleEventUPP(userRoutine)
 
#define NewOSASendUPP(userRoutine)
 
#define DisposeOSACreateAppleEventUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeOSASendUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeOSACreateAppleEventUPP(theAEEventClass, theAEEventID, target, returnID, transactionID, result, refCon, userUPP)
 
#define InvokeOSASendUPP(theAppleEvent, reply, sendMode, sendPriority, timeOutInTicks, idleProc, filterProc, refCon, userUPP)
 
#define NewOSACreateAppleEventProc(userRoutine)    NewOSACreateAppleEventUPP(userRoutine)
 
#define NewOSASendProc(userRoutine)   NewOSASendUPP(userRoutine)
 
#define CallOSACreateAppleEventProc(userRoutine, theAEEventClass, theAEEventID, target, returnID, transactionID, result, refCon)
 
#define CallOSASendProc(userRoutine, theAppleEvent, reply, sendMode, sendPriority, timeOutInTicks, idleProc, filterProc, refCon)
 
#define NewOSAActiveUPP(userRoutine)
 
#define DisposeOSAActiveUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeOSAActiveUPP(refCon, userUPP)    (OSErr) CALL_ONE_PARAMETER_UPP((userUPP), uppOSAActiveProcInfo, (refCon))
 
#define NewOSAActiveProc(userRoutine)   NewOSAActiveUPP(userRoutine)
 
#define CallOSAActiveProc(userRoutine, refCon)    InvokeOSAActiveUPP(refCon, userRoutine)
 

Typedefs

typedef ComponentResult OSAError
 
typedef unsigned long OSAID
 
typedef AEEventID theAEEventID
 
typedef AEEventID const AEAddressDesctarget
 
typedef AEEventID const AEAddressDesc short returnID
 
typedef AEEventID const AEAddressDesc short long transactionID
 
typedef AEEventID const AEAddressDesc short long AppleEventresult
 
typedef AEEventID const AEAddressDesc short long AppleEvent long refCon
 
typedef AppleEventreply
 
typedef AppleEvent AESendMode sendMode
 
typedef AppleEvent AESendMode AESendPriority sendPriority
 
typedef AppleEvent AESendMode AESendPriority long timeOutInTicks
 
typedef AppleEvent AESendMode AESendPriority long AEIdleUPP idleProc
 
typedef AppleEvent AESendMode AESendPriority long AEIdleUPP AEFilterUPP filterProc
 
typedef OSAID OSADebugSessionRef
 
typedef OSAID OSADebugCallFrameRef
 
typedef UInt32 OSAProgramState
 
typedef UInt32 OSADebugStepKind
 
typedef UInt32 OSALocalOrGlobal
 
typedef struct StatementRange StatementRange
 

Enumerations

enum  { kOSAComponentType = FOUR_CHAR_CODE('osa ') }
 
enum  { kOSAGenericScriptingComponentSubtype = FOUR_CHAR_CODE('scpt') }
 
enum  { kOSAFileType = FOUR_CHAR_CODE('osas') }
 
enum  { kOSASuite = FOUR_CHAR_CODE('ascr') }
 
enum  { kOSARecordedText = FOUR_CHAR_CODE('recd') }
 
enum  { kOSAScriptIsModified = FOUR_CHAR_CODE('modi') }
 
enum  { kOSAScriptIsTypeCompiledScript = FOUR_CHAR_CODE('cscr') }
 
enum  { kOSAScriptIsTypeScriptValue = FOUR_CHAR_CODE('valu') }
 
enum  { kOSAScriptIsTypeScriptContext = FOUR_CHAR_CODE('cntx') }
 
enum  { kOSAScriptBestType = FOUR_CHAR_CODE('best') }
 
enum  { kOSACanGetSource = FOUR_CHAR_CODE('gsrc') }
 
enum  {
  typeOSADialectInfo = FOUR_CHAR_CODE('difo') , keyOSADialectName = FOUR_CHAR_CODE('dnam') , keyOSADialectCode = FOUR_CHAR_CODE('dcod') , keyOSADialectLangCode = FOUR_CHAR_CODE('dlcd') ,
  keyOSADialectScriptCode = FOUR_CHAR_CODE('dscd')
}
 
enum  { kOSANullScript = 0L }
 
enum  { kOSANullMode = 0 , kOSAModeNull = 0 }
 
enum  { uppOSACreateAppleEventProcInfo = 0x000FEFE0 }
 
enum  { uppOSASendProcInfo = 0x003FEFE0 }
 
enum  {
  kOSASupportsCompiling = 0x0002 , kOSASupportsGetSource = 0x0004 , kOSASupportsAECoercion = 0x0008 , kOSASupportsAESending = 0x0010 ,
  kOSASupportsRecording = 0x0020 , kOSASupportsConvenience = 0x0040 , kOSASupportsDialects = 0x0080 , kOSASupportsEventHandling = 0x0100
}
 
enum  {
  kOSASelectLoad = 0x0001 , kOSASelectStore = 0x0002 , kOSASelectExecute = 0x0003 , kOSASelectDisplay = 0x0004 ,
  kOSASelectScriptError = 0x0005 , kOSASelectDispose = 0x0006 , kOSASelectSetScriptInfo = 0x0007 , kOSASelectGetScriptInfo = 0x0008 ,
  kOSASelectSetActiveProc = 0x0009 , kOSASelectGetActiveProc = 0x000A
}
 
enum  { kOSASelectScriptingComponentName = 0x0102 , kOSASelectCompile = 0x0103 , kOSASelectCopyID = 0x0104 }
 
enum  { kOSASelectCopyScript = 0x0105 }
 
enum  { kOSASelectGetSource = 0x0201 }
 
enum  { kOSASelectCoerceFromDesc = 0x0301 , kOSASelectCoerceToDesc = 0x0302 }
 
enum  {
  kOSASelectSetSendProc = 0x0401 , kOSASelectGetSendProc = 0x0402 , kOSASelectSetCreateProc = 0x0403 , kOSASelectGetCreateProc = 0x0404 ,
  kOSASelectSetDefaultTarget = 0x0405
}
 
enum  { kOSASelectStartRecording = 0x0501 , kOSASelectStopRecording = 0x0502 }
 
enum  { kOSASelectLoadExecute = 0x0601 , kOSASelectCompileExecute = 0x0602 , kOSASelectDoScript = 0x0603 }
 
enum  {
  kOSASelectSetCurrentDialect = 0x0701 , kOSASelectGetCurrentDialect = 0x0702 , kOSASelectAvailableDialects = 0x0703 , kOSASelectGetDialectInfo = 0x0704 ,
  kOSASelectAvailableDialectCodeList = 0x0705
}
 
enum  {
  kOSASelectSetResumeDispatchProc = 0x0801 , kOSASelectGetResumeDispatchProc = 0x0802 , kOSASelectExecuteEvent = 0x0803 , kOSASelectDoEvent = 0x0804 ,
  kOSASelectMakeContext = 0x0805
}
 
enum  {
  kOSADebuggerCreateSession = 0x0901 , kOSADebuggerGetSessionState = 0x0902 , kOSADebuggerSessionStep = 0x0903 , kOSADebuggerDisposeSession = 0x0904 ,
  kOSADebuggerGetStatementRanges = 0x0905 , kOSADebuggerGetBreakpoint = 0x0910 , kOSADebuggerSetBreakpoint = 0x0911 , kOSADebuggerGetDefaultBreakpoint = 0x0912 ,
  kOSADebuggerGetCurrentCallFrame = 0x0906 , kOSADebuggerGetCallFrameState = 0x0907 , kOSADebuggerGetVariable = 0x0908 , kOSADebuggerSetVariable = 0x0909 ,
  kOSADebuggerGetPreviousCallFrame = 0x090A , kOSADebuggerDisposeCallFrame = 0x090B , kOSADebuggerCountVariables = 0x090C
}
 
enum  { kOSASelectComponentSpecificStart = 0x1001 }
 
enum  { kOSAModePreventGetSource = 0x00000001 }
 
enum  { kOSAModeNeverInteract = kAENeverInteract , kOSAModeCanInteract = kAECanInteract , kOSAModeAlwaysInteract = kAEAlwaysInteract , kOSAModeDontReconnect = kAEDontReconnect }
 
enum  { kOSAModeCantSwitchLayer = 0x00000040 }
 
enum  { kOSAModeDoRecord = 0x00001000 }
 
enum  { kOSAModeCompileIntoContext = 0x00000002 }
 
enum  { kOSAModeAugmentContext = 0x00000004 }
 
enum  { kOSAModeDisplayForHumans = 0x00000008 }
 
enum  { kOSAModeDontStoreParent = 0x00010000 }
 
enum  { kOSAModeDispatchToDirectObject = 0x00020000 }
 
enum  { kOSAModeDontGetDataForArguments = 0x00040000 }
 
enum  { kOSAScriptResourceType = kOSAGenericScriptingComponentSubtype }
 
enum  { typeOSAGenericStorage = kOSAScriptResourceType }
 
enum  { kOSAErrorNumber = keyErrorNumber }
 
enum  { kOSAErrorMessage = keyErrorString }
 
enum  { kOSAErrorBriefMessage = FOUR_CHAR_CODE('errb') }
 
enum  { kOSAErrorApp = FOUR_CHAR_CODE('erap') }
 
enum  { kOSAErrorPartialResult = FOUR_CHAR_CODE('ptlr') }
 
enum  { kOSAErrorOffendingObject = FOUR_CHAR_CODE('erob') }
 
enum  { kOSAErrorExpectedType = FOUR_CHAR_CODE('errt') }
 
enum  { kOSAErrorRange = FOUR_CHAR_CODE('erng') }
 
enum  { typeOSAErrorRange = FOUR_CHAR_CODE('erng') }
 
enum  { keyOSASourceStart = FOUR_CHAR_CODE('srcs') }
 
enum  { keyOSASourceEnd = FOUR_CHAR_CODE('srce') }
 
enum  { uppOSAActiveProcInfo = 0x000000E0 }
 
enum  { kOSAUseStandardDispatch = kAEUseStandardDispatch }
 
enum  { kOSANoDispatch = kAENoDispatch }
 
enum  { kOSADontUsePhac = 0x0001 }
 
enum  {
  eNotStarted = 0 , eRunnable = 1 , eRunning = 2 , eStopped = 3 ,
  eTerminated = 4
}
 
enum  { eStepOver = 0 , eStepIn = 1 , eStepOut = 2 , eRun = 3 }
 
enum  { eLocal = 0 , eGlobal = 1 , eProperties = 2 }
 
enum  { keyProgramState = FOUR_CHAR_CODE('dsps') }
 
enum  { typeStatementRange = FOUR_CHAR_CODE('srng') }
 
enum  {
  keyProcedureName = FOUR_CHAR_CODE('dfnm') , keyStatementRange = FOUR_CHAR_CODE('dfsr') , keyLocalsNames = FOUR_CHAR_CODE('dfln') , keyGlobalsNames = FOUR_CHAR_CODE('dfgn') ,
  keyParamsNames = FOUR_CHAR_CODE('dfpn')
}
 

Functions

typedef CALLBACK_API (OSErr, OSACreateAppleEventProcPtr)(AEEventClass theAEEventClass
 
typedef CALLBACK_API (OSErr, OSASendProcPtr)(const AppleEvent *theAppleEvent
 
typedef STACK_UPP_TYPE (OSACreateAppleEventProcPtr) OSACreateAppleEventUPP
 
typedef STACK_UPP_TYPE (OSASendProcPtr) OSASendUPP
 
OSACreateAppleEventUPP NewOSACreateAppleEventUPP (OSACreateAppleEventProcPtr userRoutine)
 
OSASendUPP NewOSASendUPP (OSASendProcPtr userRoutine)
 
void DisposeOSACreateAppleEventUPP (OSACreateAppleEventUPP userUPP)
 
void DisposeOSASendUPP (OSASendUPP userUPP)
 
OSErr InvokeOSACreateAppleEventUPP (AEEventClass theAEEventClass, AEEventID theAEEventID, const AEAddressDesc *target, short returnID, long transactionID, AppleEvent *result, long refCon, OSACreateAppleEventUPP userUPP)
 
OSErr InvokeOSASendUPP (const AppleEvent *theAppleEvent, AppleEvent *reply, AESendMode sendMode, AESendPriority sendPriority, long timeOutInTicks, AEIdleUPP idleProc, AEFilterUPP filterProc, long refCon, OSASendUPP userUPP)
 
OSAError OSALoad (ComponentInstance scriptingComponent, const AEDesc *scriptData, long modeFlags, OSAID *resultingScriptID)
 
OSAError OSAStore (ComponentInstance scriptingComponent, OSAID scriptID, DescType desiredType, long modeFlags, AEDesc *resultingScriptData)
 
OSAError OSAExecute (ComponentInstance scriptingComponent, OSAID compiledScriptID, OSAID contextID, long modeFlags, OSAID *resultingScriptValueID)
 
OSAError OSADisplay (ComponentInstance scriptingComponent, OSAID scriptValueID, DescType desiredType, long modeFlags, AEDesc *resultingText)
 
OSAError OSAScriptError (ComponentInstance scriptingComponent, OSType selector, DescType desiredType, AEDesc *resultingErrorDescription)
 
OSAError OSADispose (ComponentInstance scriptingComponent, OSAID scriptID)
 
OSAError OSASetScriptInfo (ComponentInstance scriptingComponent, OSAID scriptID, OSType selector, long value)
 
OSAError OSAGetScriptInfo (ComponentInstance scriptingComponent, OSAID scriptID, OSType selector, long *result)
 
typedef CALLBACK_API (OSErr, OSAActiveProcPtr)(long refCon)
 
typedef STACK_UPP_TYPE (OSAActiveProcPtr) OSAActiveUPP
 
OSAActiveUPP NewOSAActiveUPP (OSAActiveProcPtr userRoutine)
 
void DisposeOSAActiveUPP (OSAActiveUPP userUPP)
 
OSErr InvokeOSAActiveUPP (long refCon, OSAActiveUPP userUPP)
 
OSAError OSASetActiveProc (ComponentInstance scriptingComponent, OSAActiveUPP activeProc, long refCon)
 
OSAError OSAGetActiveProc (ComponentInstance scriptingComponent, OSAActiveUPP *activeProc, long *refCon)
 
OSAError OSAScriptingComponentName (ComponentInstance scriptingComponent, AEDesc *resultingScriptingComponentName)
 
OSAError OSACompile (ComponentInstance scriptingComponent, const AEDesc *sourceData, long modeFlags, OSAID *previousAndResultingScriptID)
 
OSAError OSACopyID (ComponentInstance scriptingComponent, OSAID fromID, OSAID *toID)
 
OSAError OSACopyScript (ComponentInstance scriptingComponent, OSAID fromID, OSAID *toID)
 
OSAError OSAGetSource (ComponentInstance scriptingComponent, OSAID scriptID, DescType desiredType, AEDesc *resultingSourceData)
 
OSAError OSACoerceFromDesc (ComponentInstance scriptingComponent, const AEDesc *scriptData, long modeFlags, OSAID *resultingScriptID)
 
OSAError OSACoerceToDesc (ComponentInstance scriptingComponent, OSAID scriptID, DescType desiredType, long modeFlags, AEDesc *result)
 
OSAError OSASetSendProc (ComponentInstance scriptingComponent, OSASendUPP sendProc, long refCon)
 
OSAError OSAGetSendProc (ComponentInstance scriptingComponent, OSASendUPP *sendProc, long *refCon)
 
OSAError OSASetCreateProc (ComponentInstance scriptingComponent, OSACreateAppleEventUPP createProc, long refCon)
 
OSAError OSAGetCreateProc (ComponentInstance scriptingComponent, OSACreateAppleEventUPP *createProc, long *refCon)
 
OSAError OSASetDefaultTarget (ComponentInstance scriptingComponent, const AEAddressDesc *target)
 
OSAError OSAStartRecording (ComponentInstance scriptingComponent, OSAID *compiledScriptToModifyID)
 
OSAError OSAStopRecording (ComponentInstance scriptingComponent, OSAID compiledScriptID)
 
OSAError OSALoadExecute (ComponentInstance scriptingComponent, const AEDesc *scriptData, OSAID contextID, long modeFlags, OSAID *resultingScriptValueID)
 
OSAError OSACompileExecute (ComponentInstance scriptingComponent, const AEDesc *sourceData, OSAID contextID, long modeFlags, OSAID *resultingScriptValueID)
 
OSAError OSADoScript (ComponentInstance scriptingComponent, const AEDesc *sourceData, OSAID contextID, DescType desiredType, long modeFlags, AEDesc *resultingText)
 
OSAError OSASetCurrentDialect (ComponentInstance scriptingComponent, short dialectCode)
 
OSAError OSAGetCurrentDialect (ComponentInstance scriptingComponent, short *resultingDialectCode)
 
OSAError OSAAvailableDialects (ComponentInstance scriptingComponent, AEDesc *resultingDialectInfoList)
 
OSAError OSAGetDialectInfo (ComponentInstance scriptingComponent, short dialectCode, OSType selector, AEDesc *resultingDialectInfo)
 
OSAError OSAAvailableDialectCodeList (ComponentInstance scriptingComponent, AEDesc *resultingDialectCodeList)
 
OSAError OSASetResumeDispatchProc (ComponentInstance scriptingComponent, AEEventHandlerUPP resumeDispatchProc, long refCon)
 
OSAError OSAGetResumeDispatchProc (ComponentInstance scriptingComponent, AEEventHandlerUPP *resumeDispatchProc, long *refCon)
 
OSAError OSAExecuteEvent (ComponentInstance scriptingComponent, const AppleEvent *theAppleEvent, OSAID contextID, long modeFlags, OSAID *resultingScriptValueID)
 
OSAError OSADoEvent (ComponentInstance scriptingComponent, const AppleEvent *theAppleEvent, OSAID contextID, long modeFlags, AppleEvent *reply)
 
OSAError OSAMakeContext (ComponentInstance scriptingComponent, const AEDesc *contextName, OSAID parentContext, OSAID *resultingContextID)
 
OSAError OSADebuggerCreateSession (ComponentInstance scriptingComponent, OSAID inScript, OSAID inContext, OSADebugSessionRef *outSession)
 
OSAError OSADebuggerGetSessionState (ComponentInstance scriptingComponent, OSADebugSessionRef inSession, AERecord *outState)
 
OSAError OSADebuggerSessionStep (ComponentInstance scriptingComponent, OSADebugSessionRef inSession, OSADebugStepKind inKind)
 
OSAError OSADebuggerDisposeSession (ComponentInstance scriptingComponent, OSADebugSessionRef inSession)
 
OSAError OSADebuggerGetStatementRanges (ComponentInstance scriptingComponent, OSADebugSessionRef inSession, AEDescList *outStatementRangeArray)
 
OSAError OSADebuggerGetBreakpoint (ComponentInstance scriptingComponent, OSADebugSessionRef inSession, UInt32 inSrcOffset, OSAID *outBreakpoint)
 
OSAError OSADebuggerSetBreakpoint (ComponentInstance scriptingComponent, OSADebugSessionRef inSession, UInt32 inSrcOffset, OSAID inBreakpoint)
 
OSAError OSADebuggerGetDefaultBreakpoint (ComponentInstance scriptingComponent, OSADebugSessionRef inSession, OSAID *outBreakpoint)
 
OSAError OSADebuggerGetCurrentCallFrame (ComponentInstance scriptingComponent, OSADebugSessionRef inSession, OSADebugCallFrameRef *outCallFrame)
 
OSAError OSADebuggerGetCallFrameState (ComponentInstance scriptingComponent, OSADebugCallFrameRef inCallFrame, AERecord *outState)
 
OSAError OSADebuggerGetVariable (ComponentInstance scriptingComponent, OSADebugCallFrameRef inCallFrame, const AEDesc *inVariableName, OSAID *outVariable)
 
OSAError OSADebuggerSetVariable (ComponentInstance scriptingComponent, OSADebugCallFrameRef inCallFrame, const AEDesc *inVariableName, OSAID inVariable)
 
OSAError OSADebuggerGetPreviousCallFrame (ComponentInstance scriptingComponent, OSADebugCallFrameRef inCurrentFrame, OSADebugCallFrameRef *outPrevFrame)
 
OSAError OSADebuggerDisposeCallFrame (ComponentInstance scriptingComponent, OSADebugCallFrameRef inCallFrame)
 
OSAError OSADebuggerCountVariables (ComponentInstance scriptingComponent, OSADebugSessionRef inSession, OSADebugCallFrameRef inCallFrame, OSALocalOrGlobal inWhichSet, long *outVariableCount)
 

Detailed Description

Open Scripting Architecture Client Interfaces.

Introduced In: AppleScript 1.4
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/

Macro Definition Documentation

◆ CallOSACreateAppleEventProc

#define CallOSACreateAppleEventProc (   userRoutine,
  theAEEventClass,
  theAEEventID,
  target,
  returnID,
  transactionID,
  result,
  refCon 
)
Value:
InvokeOSACreateAppleEventUPP(theAEEventClass, theAEEventID, target, \
returnID, transactionID, result, refCon, \
userRoutine)
OSErr InvokeOSACreateAppleEventUPP(AEEventClass theAEEventClass, AEEventID theAEEventID, const AEAddressDesc *target, short returnID, long transactionID, AppleEvent *result, long refCon, OSACreateAppleEventUPP userUPP)

◆ CallOSASendProc

#define CallOSASendProc (   userRoutine,
  theAppleEvent,
  reply,
  sendMode,
  sendPriority,
  timeOutInTicks,
  idleProc,
  filterProc,
  refCon 
)
Value:
InvokeOSASendUPP(theAppleEvent, reply, sendMode, sendPriority, \
timeOutInTicks, idleProc, filterProc, refCon, userRoutine)
OSErr InvokeOSASendUPP(const AppleEvent *theAppleEvent, AppleEvent *reply, AESendMode sendMode, AESendPriority sendPriority, long timeOutInTicks, AEIdleUPP idleProc, AEFilterUPP filterProc, long refCon, OSASendUPP userUPP)
Definition: AEDataModel.h:175

◆ InvokeOSACreateAppleEventUPP

#define InvokeOSACreateAppleEventUPP (   theAEEventClass,
  theAEEventID,
  target,
  returnID,
  transactionID,
  result,
  refCon,
  userUPP 
)
Value:
(OSErr) CALL_SEVEN_PARAMETER_UPP((userUPP), uppOSACreateAppleEventProcInfo, \
(theAEEventClass), (theAEEventID), \
(target), (returnID), (transactionID), \
(result), (refCon))

◆ InvokeOSASendUPP

#define InvokeOSASendUPP (   theAppleEvent,
  reply,
  sendMode,
  sendPriority,
  timeOutInTicks,
  idleProc,
  filterProc,
  refCon,
  userUPP 
)
Value:
(OSErr) CALL_EIGHT_PARAMETER_UPP( \
(userUPP), uppOSASendProcInfo, (theAppleEvent), (reply), (sendMode), \
(sendPriority), (timeOutInTicks), (idleProc), (filterProc), (refCon))

◆ NewOSAActiveProc

#define NewOSAActiveProc (   userRoutine)    NewOSAActiveUPP(userRoutine)

support for pre-Carbon UPP routines: New...Proc and Call...Proc

◆ NewOSAActiveUPP

#define NewOSAActiveUPP (   userRoutine)
Value:
(OSAActiveUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppOSAActiveProcInfo, GetCurrentArchitecture())
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)

pascal 2_bytes Func(4_bytes)

◆ NewOSACreateAppleEventProc

#define NewOSACreateAppleEventProc (   userRoutine)     NewOSACreateAppleEventUPP(userRoutine)

support for pre-Carbon UPP routines: New...Proc and Call...Proc

◆ NewOSACreateAppleEventUPP

#define NewOSACreateAppleEventUPP (   userRoutine)
Value:
(OSACreateAppleEventUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppOSACreateAppleEventProcInfo, \
GetCurrentArchitecture())

pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes)

◆ NewOSASendUPP

#define NewOSASendUPP (   userRoutine)
Value:
(OSASendUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppOSASendProcInfo, GetCurrentArchitecture())

pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes)

Typedef Documentation

◆ OSADebugSessionRef

OSAComponentFunctionInline(kOSASelectMakeContext, 12); Makes a new empty context which may be passed to OSAExecute or OSAExecuteEvent. If contextName is typeNull, an unnamed context is created. If parentContext is kOSANullScript then the resulting context does not inherit bindings from any other context.

Errors: badComponentInstance invalid scripting component instance errOSASystemError errOSAInvalidID errAECoercionFail: contextName is invalid Debugging API Types

◆ OSAID

typedef unsigned long OSAID

Under the Open Scripting Architecture all error results are longs

◆ OSAProgramState

typedef UInt32 OSAProgramState

Constants

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

The componenent manager type code for components that support the OSA interface defined here. 0x6f736120

◆ anonymous enum

anonymous enum

0x73637074

◆ anonymous enum

anonymous enum

Type of script document files.
0x6f736173

◆ anonymous enum

anonymous enum

Suite and event code of the RecordedText event. (See OSAStartRecording, below.) 0x61736372

◆ anonymous enum

anonymous enum

0x72656364

◆ anonymous enum

anonymous enum

Selector returns boolean 0x6d6f6469

◆ anonymous enum

anonymous enum

Selector returns boolean 0x63736372

◆ anonymous enum

anonymous enum

Selector returns boolean 0x76616c75

◆ anonymous enum

anonymous enum

Selector returns boolean 0x636e7478

◆ anonymous enum

anonymous enum

Selector returns a DescType which may be passed to OSACoerceToDesc 0x62657374

◆ anonymous enum

anonymous enum

This selector is used to determine whether a script has source associated with it that when given to OSAGetSource, the call will not fail. The selector returns a boolean. 0x67737263

◆ anonymous enum

anonymous enum
Enumerator
keyOSADialectName 

0x6469666f

keyOSADialectCode 

0x646e616d

keyOSADialectLangCode 

0x64636f64

keyOSADialectScriptCode 

0x646c6364

◆ anonymous enum

anonymous enum

OSAIDs allow transparent manipulation of scripts associated with various scripting systems.

◆ anonymous enum

anonymous enum

No -script constant.

Enumerator
kOSAModeNull 

sounds better

◆ anonymous enum

anonymous enum

CALL_NOT_IN_CARBON OSA Component Flags:

◆ anonymous enum

anonymous enum

Component Selectors:

◆ anonymous enum

anonymous enum

Compiling:

◆ anonymous enum

anonymous enum

GetSource:

◆ anonymous enum

anonymous enum

AECoercion:

◆ anonymous enum

anonymous enum

AESending:

◆ anonymous enum

anonymous enum

Recording:

◆ anonymous enum

anonymous enum

Convenience:

◆ anonymous enum

anonymous enum

Dialects:

◆ anonymous enum

anonymous enum

Event Handling:

◆ anonymous enum

anonymous enum

Debugging

◆ anonymous enum

anonymous enum

scripting component specific selectors are added beginning with this value

◆ anonymous enum

anonymous enum

Mode Flags:

Warning: These should not conflict with the AESend mode flags in AppleEvents.h, because we may want to use them as OSA mode flags too. This mode flag may be passed to OSALoad, OSAStore or OSACompile to instruct the scripting component to not retain the "source" of an expression. This will cause the OSAGetSource call to return the error errOSASourceNotAvailable if used. However, some scripting components may not retain the source anyway. This is mainly used when either space efficiency is desired, or a script is to be "locked" so that its implementation may not be viewed.

◆ anonymous enum

anonymous enum

These mode flags may be passed to OSACompile, OSAExecute, OSALoadExecute OSACompileExecute, OSADoScript, OSAExecuteEvent, or OSADoEvent to indicate whether or not the script may interact with the user, switch layer or reconnect if necessary. Any AppleEvents will be sent with the corresponding AESend mode supplied.

◆ anonymous enum

anonymous enum

This mode flag may be passed to OSACompile, OSAExecute, OSALoadExecute OSACompileExecute, OSADoScript, OSAExecuteEvent, or OSADoEvent to indicate whether or not AppleEvents should be sent with the kAECanSwitchLayer mode flag sent or not. NOTE: This flag is exactly the opposite sense of the AppleEvent flag kAECanSwitchLayer. This is to provide a more convenient default, i.e. not supplying any mode (kOSAModeNull) means to send events with kAECanSwitchLayer. Supplying the kOSAModeCantSwitchLayer mode flag will cause AESend to be called without kAECanSwitchLayer.

◆ anonymous enum

anonymous enum
 This mode flag may be passed to OSACompile, OSAExecute, OSALoadExecute
 OSACompileExecute, OSADoScript, OSAExecuteEvent, or OSADoEvent to
 indicate whether or not AppleEvents should be sent with the

kAEDontRecord mode flag sent or not. NOTE: This flag is exactly the opposite sense of the AppleEvent flag kAEDontRecord. This is to provide a more convenient default, i.e. not supplying any mode (kOSAModeNull) means to send events with kAEDontRecord. Supplying the kOSAModeDoRecord mode flag will cause AESend to be called without kAEDontRecord.

◆ anonymous enum

anonymous enum

This is a mode flag for OSACompile that indicates that a context should be created as the result of compilation. All handler definitions are inserted into the new context, and variables are initialized by evaluating their initial values in a null context (i.e. they must be constant expressions).

◆ anonymous enum

anonymous enum

This is a mode flag for OSACompile that indicates that the previous script ID (input to OSACompile) should be augmented with any new definitions in the sourceData rather than replaced with a new script. This means that the previous script ID must designate a context. The presence of this flag causes the kOSAModeCompileIntoContext flag to be implicitly used, causing any new definitions to be initialized in a null context.

◆ anonymous enum

anonymous enum
 This mode flag may be passed to OSADisplay or OSADoScript to indicate
 that output only need be human-readable, not re-compilable by

OSACompile. If used, output may be arbitrarily "beautified", e.g. quotes may be left off of string values, long lists may have elipses, etc.

◆ anonymous enum

anonymous enum
 This mode flag may be passed to OSAStore in the case where the scriptID
 is a context.  This causes the context to be saved, but not the

context's parent context. When the stored context is loaded back in, the parent will be kOSANullScript.

◆ anonymous enum

anonymous enum

This mode flag may be passed to OSAExecuteEvent to cause the event to be dispatched to the direct object of the event. The direct object (or subject attribute if the direct object is a non-object specifier) will be resolved, and the resulting script object will be the recipient of the message. The context argument to OSAExecuteEvent will serve as the root of the lookup/resolution process.

◆ anonymous enum

anonymous enum

This mode flag may be passed to OSAExecuteEvent to indicate that components do not have to get the data of object specifier arguments.

◆ anonymous enum

anonymous enum

Loading and Storing Scripts:

These routines allow scripts to be loaded and stored in their internal (possibly compiled, non-text) representation. Resource type for scripts

◆ anonymous enum

anonymous enum

Default type given to OSAStore which creates "generic" loadable script data descriptors.

◆ anonymous enum

anonymous enum
 OSAComponentFunctionInline(kOSASelectScriptError, 12);
 Whenever script execution returns errOSAExecutionError, this routine
 may be used to get information about that error.  The selector describes
 the type of information desired about the error (various selectors are
 listed below).  The desiredType indicates the data type of the result
 desired for that selector.

 Errors:
     badComponentInstance    invalid scripting component instance
     errOSASystemError
     errOSABadSelector:      selector not supported by scripting

component errAECoercionFail: desiredType not supported by scripting component OSAScriptError selectors: This selector is used to determine the error number of a script error. These error numbers may be either system error numbers, or error numbers that are scripting component specific. Required desiredTypes: typeShortInteger

◆ anonymous enum

anonymous enum

This selector is used to determine the full error message associated with the error number. It should include the name of the application which caused the error, as well as the specific error that occurred. This selector is sufficient for simple error reporting (but see kOSAErrorBriefMessage, below). Required desiredTypes: typeChar error message string

◆ anonymous enum

anonymous enum

This selector is used to determine a brief error message associated with the error number. This message and should not mention the name of the application which caused the error, any partial results or offending object (see kOSAErrorApp, kOSAErrorPartialResult and kOSAErrorOffendingObject, below). Required desiredTypes: typeChar brief error message string 0x65727262

◆ anonymous enum

anonymous enum

This selector is used to determine which application actually got the error (if it was the result of an AESend), or the current application if .... Required desiredTypes: typeProcessSerialNumber PSN of the errant application typeChar name of the errant application 0x65726170

◆ anonymous enum

anonymous enum

This selector is used to determine any partial result returned by an operation. If an AESend call failed, but a partial result was returned, then the partial result may be returned as an AEDesc. Required desiredTypes: typeBest AEDesc of any partial result 0x70746c72

◆ anonymous enum

anonymous enum

This selector is used to determine any object which caused the error that may have been indicated by an application. The result is an AEDesc. Required desiredTypes: typeBest AEDesc of any offending object 0x65726f62

◆ anonymous enum

anonymous enum

This selector is used to determine the type expected by a coercion operation if a type error occurred. 0x65727274

◆ anonymous enum

anonymous enum

This selector is used to determine the source text range (start and end positions) of where the error occurred. Required desiredTypes: typeOSAErrorRange 0x65726e67

◆ anonymous enum

anonymous enum

An AERecord type containing keyOSASourceStart and keyOSASourceEnd fields of type short. 0x65726e67

◆ anonymous enum

anonymous enum

Field of a typeOSAErrorRange record of typeShortInteger 0x73726373

◆ anonymous enum

anonymous enum

Field of a typeOSAErrorRange record of typeShortInteger 0x73726365

◆ anonymous enum

anonymous enum
 OSAComponentFunctionInline(kOSASelectSetResumeDispatchProc, 8);
 This function is used to set the ResumeDispatchProc that will be used
 by OSAExecuteEvent and OSADoEvent if either no event handler can be
 found in the context, or the context event hander "continues" control
 onward. The two constants kOSAUseStandardDispatch and kOSANoDispatch
 may also be passed to this routine indicating that the handler

registered in the application with AEInstallEventHandler should be used, or no dispatch should occur, respectively.

 Errors:
     badComponentInstance    invalid scripting component instance
     errOSASystemError

◆ anonymous enum

anonymous enum

Special ResumeDispatchProc constant which may be passed to OSASetResumeDispatchProc indicating that the handler registered in the application with AEInstallEventHandler should be used.

NOTE: Had to remove the cast (AEEventHandlerUPP). The C compiler doesn't allow pointer types to be assigned to an enum. All constants must be assigned as enums to translate properly to Pascal.

◆ anonymous enum

anonymous enum

Special ResumeDispatchProc constant which may be passed to OSASetResumeDispatchProc indicating that no dispatch should occur.

NOTE: Had to remove the cast (AEEventHandlerUPP). The C compiler doesn't allow pointer types to be assigned to an enum. All constants must be assigned as enums to translate properly to Pascal.

◆ anonymous enum

anonymous enum

Session Information

◆ anonymous enum

anonymous enum
Enumerator
keyStatementRange 

typeChar

keyLocalsNames 

typeStatementRange

keyGlobalsNames 

typeAEList of typeChar

keyParamsNames 

typeAEList of typeChar

Function Documentation

◆ CALLBACK_API() [1/2]

typedef CALLBACK_API ( OSErr  ,
OSAActiveProcPtr   
)
 OSAComponentFunctionInline(kOSASelectGetScriptInfo, 12);

 Errors:
     badComponentInstance    invalid scripting component instance
     errOSASystemError
     errOSAInvalidID
     errOSABadSelector:      selector not supported by scripting

component or selector not for this scriptID Manipulating the ActiveProc:

Scripting systems will supply default values for these procedures if they are not set by the client:

◆ CALLBACK_API() [2/2]

typedef CALLBACK_API ( OSErr  ,
OSACreateAppleEventProcPtr   
)

Some routines take flags that control their execution. This constant declares default mode settings are used.

◆ DisposeOSAActiveUPP()

void DisposeOSAActiveUPP ( OSAActiveUPP  userUPP)

DisposeOSAActiveUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeOSACreateAppleEventUPP()

void DisposeOSACreateAppleEventUPP ( OSACreateAppleEventUPP  userUPP)

DisposeOSACreateAppleEventUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeOSASendUPP()

void DisposeOSASendUPP ( OSASendUPP  userUPP)

DisposeOSASendUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeOSAActiveUPP()

OSErr InvokeOSAActiveUPP ( long  refCon,
OSAActiveUPP  userUPP 
)

InvokeOSAActiveUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeOSACreateAppleEventUPP()

OSErr InvokeOSACreateAppleEventUPP ( AEEventClass  theAEEventClass,
AEEventID  theAEEventID,
const AEAddressDesc target,
short  returnID,
long  transactionID,
AppleEvent result,
long  refCon,
OSACreateAppleEventUPP  userUPP 
)

InvokeOSACreateAppleEventUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeOSASendUPP()

OSErr InvokeOSASendUPP ( const AppleEvent theAppleEvent,
AppleEvent reply,
AESendMode  sendMode,
AESendPriority  sendPriority,
long  timeOutInTicks,
AEIdleUPP  idleProc,
AEFilterUPP  filterProc,
long  refCon,
OSASendUPP  userUPP 
)

InvokeOSASendUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewOSAActiveUPP()

OSAActiveUPP NewOSAActiveUPP ( OSAActiveProcPtr  userRoutine)

NewOSAActiveUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewOSACreateAppleEventUPP()

OSACreateAppleEventUPP NewOSACreateAppleEventUPP ( OSACreateAppleEventProcPtr  userRoutine)

NewOSACreateAppleEventUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewOSASendUPP()

OSASendUPP NewOSASendUPP ( OSASendProcPtr  userRoutine)

NewOSASendUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ OSAAvailableDialectCodeList()

OSAError OSAAvailableDialectCodeList ( ComponentInstance  scriptingComponent,
AEDesc resultingDialectCodeList 
)

OSAComponentFunctionInline(kOSASelectGetDialectInfo, 10); This call gives information about the specified dialect of a scripting component. It returns an AEDesc whose type depends on the selector specified. Available selectors are the same as the field keys for a dialect info record. The type of AEDesc returned is the same as the type of the field that has same key as the selector.

Errors: badComponentInstance invalid scripting component instance errOSASystemError errOSABadSelector errOSANoSuchDialect: invalid dialectCode OSAAvailableDialectCodeList()

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

◆ OSAAvailableDialects()

OSAError OSAAvailableDialects ( ComponentInstance  scriptingComponent,
AEDesc resultingDialectInfoList 
)

OSAComponentFunctionInline(kOSASelectGetCurrentDialect, 4);

Errors: badComponentInstance invalid scripting component instance errOSASystemError OSAAvailableDialects()

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

◆ OSACoerceFromDesc()

OSAError OSACoerceFromDesc ( ComponentInstance  scriptingComponent,
const AEDesc scriptData,
long  modeFlags,
OSAID resultingScriptID 
)

OSAComponentFunctionInline(kOSASelectGetSource, 12); This routine causes a compiled script to be output in a form (possibly text) such that it is suitable to be passed back to OSACompile.

Errors: badComponentInstance invalid scripting component instance errOSASystemError errOSAInvalidID errOSASourceNotAvailable can't get source for this scriptID OSACoerceFromDesc()

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

◆ OSACoerceToDesc()

OSAError OSACoerceToDesc ( ComponentInstance  scriptingComponent,
OSAID  scriptID,
DescType  desiredType,
long  modeFlags,
AEDesc result 
)

OSAComponentFunctionInline(kOSASelectCoerceFromDesc, 12); This routine causes script data to be coerced into a script value. If the scriptData is an AppleEvent, then the resultingScriptID is a compiled script ID (mode flags for OSACompile may be used in this case). Other scriptData descriptors create script value IDs.

Errors: badComponentInstance invalid scripting component instance errOSASystemError

ModeFlags: kOSAModePreventGetSource kOSAModeCompileIntoContext kOSAModeNeverInteract kOSAModeCanInteract kOSAModeAlwaysInteract kOSAModeCantSwitchLayer kOSAModeDontReconnect kOSAModeDoRecord OSACoerceToDesc()

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

◆ OSACompile()

OSAError OSACompile ( ComponentInstance  scriptingComponent,
const AEDesc sourceData,
long  modeFlags,
OSAID previousAndResultingScriptID 
)

OSAComponentFunctionInline(kOSASelectScriptingComponentName, 4); Given a scripting component, this routine returns the name of that scripting component in a type that is coercable to text (typeChar). The generic scripting component returns the name of the default scripting component. This name should be sufficient to convey to the user the kind of script (syntax) he is expected to write.

Errors: badComponentInstance invalid scripting component instance errOSASystemError OSACompile()

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

◆ OSACompileExecute()

OSAError OSACompileExecute ( ComponentInstance  scriptingComponent,
const AEDesc sourceData,
OSAID  contextID,
long  modeFlags,
OSAID resultingScriptValueID 
)
 OSAComponentFunctionInline(kOSASelectLoadExecute, 16);
 This routine is effectively equivalent to calling OSALoad followed by
 OSAExecute.  After execution, the compiled source is disposed.  Only the
 resulting value ID is retained.

 Errors:
     badComponentInstance        invalid scripting component instance
     errOSASystemError
     errOSABadStorageType:       scriptData not for this scripting

component errOSACorruptData: data seems to be corrupt errOSADataFormatObsolete script data format is no longer supported errOSADataFormatTooNew script data format is from a newer version errOSAInvalidID errOSAScriptError: the executing script got an error

 ModeFlags:
     kOSAModeNeverInteract
     kOSAModeCanInteract
     kOSAModeAlwaysInteract
     kOSAModeCantSwitchLayer
     kOSAModeDontReconnect
     kOSAModeDoRecord

OSACompileExecute()

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

◆ OSACopyID()

OSAError OSACopyID ( ComponentInstance  scriptingComponent,
OSAID  fromID,
OSAID toID 
)

OSAComponentFunctionInline(kOSASelectCompile, 12); Coerces input desc (possibly text) into a script's internal format. Once compiled, the script is ready to run. The modeFlags convey scripting component specific information. The previous script ID (result parameter) is made to refer to the newly compiled script, unless it was originally kOSANullScript. In this case a new script ID is created and used.

Errors: badComponentInstance invalid scripting component instance errOSASystemError errAECoercionFail: sourceData is not compilable errOSAScriptError: sourceData was a bad script (syntax error) errOSAInvalidID: previousAndResultingCompiledScriptID was not valid on input

ModeFlags: kOSAModePreventGetSource kOSAModeCompileIntoContext kOSAModeAugmentContext kOSAModeNeverInteract kOSAModeCanInteract kOSAModeAlwaysInteract kOSAModeCantSwitchLayer kOSAModeDontReconnect kOSAModeDoRecord OSACopyID()

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

◆ OSACopyScript()

OSAError OSACopyScript ( ComponentInstance  scriptingComponent,
OSAID  fromID,
OSAID toID 
)

OSAComponentFunctionInline(kOSASelectCopyID, 8); If toID is a reference to kOSANullScript then it is updated to have a new scriptID value. This call can be used to perform undo or revert operations on scripts.

Errors: badComponentInstance invalid scripting component instance errOSASystemError errOSAInvalidID OSACopyScript()

Non-Carbon CFM: in AppleScriptLib 1.5 and later
Carbon Lib: not available
Mac OS X: not available

◆ OSADebuggerCountVariables()

OSAError OSADebuggerCountVariables ( ComponentInstance  scriptingComponent,
OSADebugSessionRef  inSession,
OSADebugCallFrameRef  inCallFrame,
OSALocalOrGlobal  inWhichSet,
long *  outVariableCount 
)

OSADebuggerCountVariables()

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

◆ OSADebuggerCreateSession()

OSAError OSADebuggerCreateSession ( ComponentInstance  scriptingComponent,
OSAID  inScript,
OSAID  inContext,
OSADebugSessionRef outSession 
)

Sessions OSADebuggerCreateSession()

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

◆ OSADebuggerDisposeCallFrame()

OSAError OSADebuggerDisposeCallFrame ( ComponentInstance  scriptingComponent,
OSADebugCallFrameRef  inCallFrame 
)

OSADebuggerDisposeCallFrame()

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

◆ OSADebuggerDisposeSession()

OSAError OSADebuggerDisposeSession ( ComponentInstance  scriptingComponent,
OSADebugSessionRef  inSession 
)

OSADebuggerDisposeSession()

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

◆ OSADebuggerGetBreakpoint()

OSAError OSADebuggerGetBreakpoint ( ComponentInstance  scriptingComponent,
OSADebugSessionRef  inSession,
UInt32  inSrcOffset,
OSAID outBreakpoint 
)

Returns an array of StatementRange objects. OSADebuggerGetBreakpoint()

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

◆ OSADebuggerGetCallFrameState()

OSAError OSADebuggerGetCallFrameState ( ComponentInstance  scriptingComponent,
OSADebugCallFrameRef  inCallFrame,
AERecord outState 
)

OSADebuggerGetCallFrameState()

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

◆ OSADebuggerGetCurrentCallFrame()

OSAError OSADebuggerGetCurrentCallFrame ( ComponentInstance  scriptingComponent,
OSADebugSessionRef  inSession,
OSADebugCallFrameRef *  outCallFrame 
)

Call Frames OSADebuggerGetCurrentCallFrame()

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

◆ OSADebuggerGetDefaultBreakpoint()

OSAError OSADebuggerGetDefaultBreakpoint ( ComponentInstance  scriptingComponent,
OSADebugSessionRef  inSession,
OSAID outBreakpoint 
)

OSADebuggerGetDefaultBreakpoint()

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

◆ OSADebuggerGetPreviousCallFrame()

OSAError OSADebuggerGetPreviousCallFrame ( ComponentInstance  scriptingComponent,
OSADebugCallFrameRef  inCurrentFrame,
OSADebugCallFrameRef *  outPrevFrame 
)

OSADebuggerGetPreviousCallFrame()

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

◆ OSADebuggerGetSessionState()

OSAError OSADebuggerGetSessionState ( ComponentInstance  scriptingComponent,
OSADebugSessionRef  inSession,
AERecord outState 
)

OSADebuggerGetSessionState()

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

◆ OSADebuggerGetStatementRanges()

OSAError OSADebuggerGetStatementRanges ( ComponentInstance  scriptingComponent,
OSADebugSessionRef  inSession,
AEDescList outStatementRangeArray 
)

OSADebuggerGetStatementRanges()

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

◆ OSADebuggerGetVariable()

OSAError OSADebuggerGetVariable ( ComponentInstance  scriptingComponent,
OSADebugCallFrameRef  inCallFrame,
const AEDesc inVariableName,
OSAID outVariable 
)

OSADebuggerGetVariable()

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

◆ OSADebuggerSessionStep()

OSAError OSADebuggerSessionStep ( ComponentInstance  scriptingComponent,
OSADebugSessionRef  inSession,
OSADebugStepKind  inKind 
)

OSADebuggerSessionStep()

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

◆ OSADebuggerSetBreakpoint()

OSAError OSADebuggerSetBreakpoint ( ComponentInstance  scriptingComponent,
OSADebugSessionRef  inSession,
UInt32  inSrcOffset,
OSAID  inBreakpoint 
)

OSADebuggerSetBreakpoint()

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

◆ OSADebuggerSetVariable()

OSAError OSADebuggerSetVariable ( ComponentInstance  scriptingComponent,
OSADebugCallFrameRef  inCallFrame,
const AEDesc inVariableName,
OSAID  inVariable 
)

OSADebuggerSetVariable()

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

◆ OSADisplay()

OSAError OSADisplay ( ComponentInstance  scriptingComponent,
OSAID  scriptValueID,
DescType  desiredType,
long  modeFlags,
AEDesc resultingText 
)

OSAComponentFunctionInline(kOSASelectExecute, 16); This call runs a script. The contextID represents the environment with which global variables in the script are resolved. The constant kOSANullScript may be used for the contextID if the application wishes to not deal with context directly (a default one is associated with each scripting component instance). The resultingScriptValueID is the result of evaluation, and contains a value which may be displayed using the OSAGetSource call. The modeFlags convey scripting component specific information.

Errors: badComponentInstance invalid scripting component instance errOSASystemError errOSAInvalidID errOSAScriptError: the executing script got an error

ModeFlags: kOSAModeNeverInteract kOSAModeCanInteract kOSAModeAlwaysInteract kOSAModeCantSwitchLayer kOSAModeDontReconnect kOSAModeDoRecord Displaying results: OSADisplay()

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

◆ OSADispose()

OSAError OSADispose ( ComponentInstance  scriptingComponent,
OSAID  scriptID 
)

Disposing Script IDs: OSADispose()

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

◆ OSADoEvent()

OSAError OSADoEvent ( ComponentInstance  scriptingComponent,
const AppleEvent theAppleEvent,
OSAID  contextID,
long  modeFlags,
AppleEvent reply 
)

OSAComponentFunctionInline(kOSASelectExecuteEvent, 16); This call is similar to OSAExecute except the initial command to execute comes in the form of an AppleEvent. If the contextID defines any event handlers for that event, they are used to process the event. If no event handler can be found in the context errAEEventNotHandled is returned. If an event handler is found and the hander "continues" control onward, the ResumeDispatchProc (registered with OSASetResumeDispatchProc, above) is called given the AppleEvent. The result is returned as a scriptValueID.

Errors: badComponentInstance invalid scripting component instance errOSASystemError errOSAInvalidID errOSAScriptError: the executing script got an error errAEEventNotHandled: no handler for event in contextID

ModeFlags: kOSAModeNeverInteract kOSAModeCanInteract kOSAModeAlwaysInteract kOSAModeCantSwitchLayer kOSAModeDontReconnect kOSAModeDoRecord OSADoEvent()

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

◆ OSADoScript()

OSAError OSADoScript ( ComponentInstance  scriptingComponent,
const AEDesc sourceData,
OSAID  contextID,
DescType  desiredType,
long  modeFlags,
AEDesc resultingText 
)

OSAComponentFunctionInline(kOSASelectCompileExecute, 16); This routine is effectively equivalent to calling OSACompile followed by OSAExecute. After execution, the compiled source is disposed. Only the resulting value ID is retained.

Errors: badComponentInstance invalid scripting component instance errOSASystemError errAECoercionFail: sourceData is not compilable errOSAScriptError: sourceData was a bad script (syntax error) errOSAInvalidID: previousAndResultingCompiledScriptID was not valid on input errOSAScriptError: the executing script got an error

ModeFlags: kOSAModeNeverInteract kOSAModeCanInteract kOSAModeAlwaysInteract kOSAModeCantSwitchLayer kOSAModeDontReconnect kOSAModeDoRecord OSADoScript()

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

◆ OSAExecute()

OSAError OSAExecute ( ComponentInstance  scriptingComponent,
OSAID  compiledScriptID,
OSAID  contextID,
long  modeFlags,
OSAID resultingScriptValueID 
)

OSAComponentFunctionInline(kOSASelectStore, 16);

Errors: badComponentInstance invalid scripting component instance errOSASystemError errOSAInvalidID errOSABadStorageType: desiredType not for this scripting component

ModeFlags: kOSAModePreventGetSource kOSAModeDontStoreParent Executing Scripts: OSAExecute()

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

◆ OSAExecuteEvent()

OSAError OSAExecuteEvent ( ComponentInstance  scriptingComponent,
const AppleEvent theAppleEvent,
OSAID  contextID,
long  modeFlags,
OSAID resultingScriptValueID 
)

OSAComponentFunctionInline(kOSASelectGetResumeDispatchProc, 8); Returns the registered ResumeDispatchProc. If no ResumeDispatchProc has been registered, then kOSAUseStandardDispatch (the default) is returned.

Errors: badComponentInstance invalid scripting component instance errOSASystemError OSAExecuteEvent()

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

◆ OSAGetActiveProc()

OSAError OSAGetActiveProc ( ComponentInstance  scriptingComponent,
OSAActiveUPP *  activeProc,
long *  refCon 
)

OSAComponentFunctionInline(kOSASelectSetActiveProc, 8); If activeProc is nil, the default activeProc is used.

Errors: badComponentInstance invalid scripting component instance errOSASystemError OSAGetActiveProc()

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

◆ OSAGetCreateProc()

OSAError OSAGetCreateProc ( ComponentInstance  scriptingComponent,
OSACreateAppleEventUPP *  createProc,
long *  refCon 
)

OSAComponentFunctionInline(kOSASelectSetCreateProc, 8); If createProc is nil, the default createProc is used.

Errors: badComponentInstance invalid scripting component instance errOSASystemError OSAGetCreateProc()

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

◆ OSAGetCurrentDialect()

OSAError OSAGetCurrentDialect ( ComponentInstance  scriptingComponent,
short *  resultingDialectCode 
)

OSAComponentFunctionInline(kOSASelectSetCurrentDialect, 2);

Errors: badComponentInstance invalid scripting component instance errOSASystemError errOSANoSuchDialect: invalid dialectCode OSAGetCurrentDialect()

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

◆ OSAGetDialectInfo()

OSAError OSAGetDialectInfo ( ComponentInstance  scriptingComponent,
short  dialectCode,
OSType  selector,
AEDesc resultingDialectInfo 
)

OSAComponentFunctionInline(kOSASelectAvailableDialects, 4); This call return an AEList containing information about each of the currently available dialects of a scripting component. Each item is an AERecord of typeOSADialectInfo that contains at least the fields keyOSADialectName, keyOSADialectCode, KeyOSADialectLangCode and keyOSADialectScriptCode.

Errors: badComponentInstance invalid scripting component instance errOSASystemError OSAGetDialectInfo()

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

◆ OSAGetResumeDispatchProc()

OSAError OSAGetResumeDispatchProc ( ComponentInstance  scriptingComponent,
AEEventHandlerUPP *  resumeDispatchProc,
long *  refCon 
)

Special refCon constant that may be given to OSASetResumeDispatchProc only when kOSAUseStandardDispatch is used as the ResumeDispatchProc. This causes the standard dispatch to be performed, except the phac handler is not called. This is useful during tinkerability, when the phac handler is used to lookup a context associated with an event's direct parameter, and call OSAExecuteEvent or OSADoEvent. Failure to bypass the phac handler would result in an infinite loop. OSAGetResumeDispatchProc()

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

◆ OSAGetScriptInfo()

OSAError OSAGetScriptInfo ( ComponentInstance  scriptingComponent,
OSAID  scriptID,
OSType  selector,
long *  result 
)
 OSAComponentFunctionInline(kOSASelectSetScriptInfo, 12);

 Errors:
     badComponentInstance    invalid scripting component instance
     errOSASystemError
     errOSAInvalidID
     errOSABadSelector:      selector not supported by scripting

component or selector not for this scriptID OSAGetScriptInfo()

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

◆ OSAGetSendProc()

OSAError OSAGetSendProc ( ComponentInstance  scriptingComponent,
OSASendUPP *  sendProc,
long *  refCon 
)

OSAComponentFunctionInline(kOSASelectSetSendProc, 8); If sendProc is nil, the default sendProc is used.

Errors: badComponentInstance invalid scripting component instance errOSASystemError OSAGetSendProc()

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

◆ OSAGetSource()

OSAError OSAGetSource ( ComponentInstance  scriptingComponent,
OSAID  scriptID,
DescType  desiredType,
AEDesc resultingSourceData 
)

OSAComponentFunctionInline(kOSASelectCopyScript, 8); Creates a duplicate copy of the script with the given OSAID and returns a new OSAID for it. Can be used by script editors or debuggers.

Errors: badComponentInstance invalid scripting component instance errOSASystemError errOSAInvalidID CALL_NOT_IN_CARBON OSAGetSource()

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

◆ OSALoad()

OSAError OSALoad ( ComponentInstance  scriptingComponent,
const AEDesc scriptData,
long  modeFlags,
OSAID resultingScriptID 
)

OSALoad()

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

◆ OSALoadExecute()

OSAError OSALoadExecute ( ComponentInstance  scriptingComponent,
const AEDesc scriptData,
OSAID  contextID,
long  modeFlags,
OSAID resultingScriptValueID 
)

OSAComponentFunctionInline(kOSASelectStopRecording, 4); If compiledScriptID is not being recorded into or recording is not currently on, no error is returned.

Errors: badComponentInstance invalid scripting component instance errOSASystemError errOSAInvalidID OSALoadExecute()

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

◆ OSAMakeContext()

OSAError OSAMakeContext ( ComponentInstance  scriptingComponent,
const AEDesc contextName,
OSAID  parentContext,
OSAID resultingContextID 
)

OSAComponentFunctionInline(kOSASelectDoEvent, 16); This call is similar to OSADoScript except the initial command to execute comes in the form of an AppleEvent, and the result is an AppleEvent reply record. If the contextID defines any event handlers for that event, they are used to process the event. If no event handler can be found in the context errAEEventNotHandled is returned. If an event handler is found and the hander "continues" control onward, the ResumeDispatchProc (registered with OSASetResumeDispatchProc, above) is called given the AppleEvent. The result is returned in the form of an AppleEvent reply descriptor. If at any time the script gets an error, or if the ResumeDispatchProc returns a reply event indicating an error, then the OSADoEvent call itself returns an error reply (i.e. OSADoEvent should never return errOSAScriptError). Any error result returned by the ResumeDispatchProc will be returned by OSADoEvent.

Errors: badComponentInstance invalid scripting component instance errOSASystemError errOSAInvalidID errAEEventNotHandled: no handler for event in contextID

ModeFlags: kOSAModeNeverInteract kOSAModeCanInteract kOSAModeAlwaysInteract kOSAModeCantSwitchLayer kOSAModeDontReconnect kOSAModeDoRecord OSAMakeContext()

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

◆ OSAScriptError()

OSAError OSAScriptError ( ComponentInstance  scriptingComponent,
OSType  selector,
DescType  desiredType,
AEDesc resultingErrorDescription 
)
 OSAComponentFunctionInline(kOSASelectDisplay, 16);
 This call is used to convert results (script value IDs) into displayable
 text. The desiredType should be at least typeChar, and modeFlags are
 scripting system specific flags to control the formatting of the
 resulting text. This call differs from OSAGetSource in that (1) it
 always produces at least typeChar, (2) is only works on script values,
 (3) it may display it's output in non-compilable form (e.g. without
 string quotes, elipses inserted in long and/or circular lists, etc.) and
 (4) it is required by the basic scripting interface.

 Errors:
     badComponentInstance    invalid scripting component instance
     errOSASystemError
     errOSAInvalidID
     errAECoercionFail:      desiredType not supported by scripting

component

 ModeFlags:
     kOSAModeDisplayForHumans

Getting Error Information: OSAScriptError()

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

◆ OSAScriptingComponentName()

OSAError OSAScriptingComponentName ( ComponentInstance  scriptingComponent,
AEDesc resultingScriptingComponentName 
)

OSAComponentFunctionInline(kOSASelectGetActiveProc, 8);

Errors: badComponentInstance invalid scripting component instance errOSASystemError OSAScriptingComponentName()

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

◆ OSASetActiveProc()

OSAError OSASetActiveProc ( ComponentInstance  scriptingComponent,
OSAActiveUPP  activeProc,
long  refCon 
)

CALL_NOT_IN_CARBON OSASetActiveProc()

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

◆ OSASetCreateProc()

OSAError OSASetCreateProc ( ComponentInstance  scriptingComponent,
OSACreateAppleEventUPP  createProc,
long  refCon 
)

OSAComponentFunctionInline(kOSASelectGetSendProc, 8);

Errors: badComponentInstance invalid scripting component instance errOSASystemError OSASetCreateProc()

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

◆ OSASetCurrentDialect()

OSAError OSASetCurrentDialect ( ComponentInstance  scriptingComponent,
short  dialectCode 
)
 OSAComponentFunctionInline(kOSASelectDoScript, 20);
 This routine is effectively equivalent to calling OSACompile followed by
 OSAExecute and then OSADisplay.  After execution, the compiled source
 and the resulting value are is disposed.  Only the resultingText
 descriptor is retained.  If a script error occur during processing, the
 resultingText gets the error message of the error, and errOSAScriptError
 is returned.  OSAScriptError may still be used to extract more
 information about the particular error.

 Errors:
     badComponentInstance    invalid scripting component instance
     errOSASystemError
     errAECoercionFail:      sourceData is not compilable or
                             desiredType not supported by scripting

component errOSAScriptError: sourceData was a bad script (syntax error) errOSAInvalidID: previousAndResultingCompiledScriptID was not valid on input errOSAScriptError: the executing script got an error

ModeFlags: kOSAModeNeverInteract kOSAModeCanInteract kOSAModeAlwaysInteract kOSAModeCantSwitchLayer kOSAModeDontReconnect kOSAModeDoRecord kOSAModeDisplayForHumans These calls allows an scripting component that supports different dialects to dynamically switch between those dialects. Although this interface is specified, the particular dialect codes are scripting component dependent. OSASetCurrentDialect()

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

◆ OSASetDefaultTarget()

OSAError OSASetDefaultTarget ( ComponentInstance  scriptingComponent,
const AEAddressDesc target 
)

OSAComponentFunctionInline(kOSASelectGetCreateProc, 8);

Errors: badComponentInstance invalid scripting component instance errOSASystemError OSASetDefaultTarget()

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

◆ OSASetResumeDispatchProc()

OSAError OSASetResumeDispatchProc ( ComponentInstance  scriptingComponent,
AEEventHandlerUPP  resumeDispatchProc,
long  refCon 
)
 OSAComponentFunctionInline(kOSASelectAvailableDialectCodeList, 4);
 This is alternative to OSAGetAvailableDialectCodeList. Use this call
 and  OSAGetDialectInfo to get information on dialects.
 This call return an AEList containing dialect code for each of the
 currently available dialects of a scripting component. Each dialect
 code is a short integer of type typeShortInteger.

 Errors:
     badComponentInstance    invalid scripting component instance
     errOSASystemError

 Type of a dialect info record containing at least keyOSADialectName
 and keyOSADialectCode fields.

 keys for dialect info record, also used as selectors to

OSAGetDialectInfo.

 Field of a typeOSADialectInfo record of typeChar.
 Field of a typeOSADialectInfo record of typeShortInteger.
 Field of a typeOSADialectInfo record of typeShortInteger.
 Field of a typeOSADialectInfo record of typeShortInteger.

OSASetResumeDispatchProc()

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

◆ OSASetScriptInfo()

OSAError OSASetScriptInfo ( ComponentInstance  scriptingComponent,
OSAID  scriptID,
OSType  selector,
long  value 
)

OSAComponentFunctionInline(kOSASelectDispose, 4); Disposes a script or context.

Errors: badComponentInstance invalid scripting component instance errOSASystemError errOSAInvalidID Getting and Setting Script Information: OSASetScriptInfo()

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

◆ OSASetSendProc()

OSAError OSASetSendProc ( ComponentInstance  scriptingComponent,
OSASendUPP  sendProc,
long  refCon 
)

OSAComponentFunctionInline(kOSASelectCoerceToDesc, 16); This routine causes a script value to be coerced into any desired form. If the scriptID denotes a compiled script, then it may be coerced to typeAppleEvent.

Errors: badComponentInstance invalid scripting component instance errOSASystemError errOSAInvalidID Scripting systems will supply default values for these procedures if they are not set by the client: OSASetSendProc()

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

◆ OSAStartRecording()

OSAError OSAStartRecording ( ComponentInstance  scriptingComponent,
OSAID compiledScriptToModifyID 
)

OSAComponentFunctionInline(kOSASelectSetDefaultTarget, 4); This routine sets the default target application for AE sending. It also establishes the default target from which terminologies come. It is effectively like having an AppleScript "tell" statement around the entire program. If this routine is not called, or if the target is a null AEDesc, then the current application is the default target.

Errors: badComponentInstance invalid scripting component instance errOSASystemError OSAStartRecording()

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

◆ OSAStopRecording()

OSAError OSAStopRecording ( ComponentInstance  scriptingComponent,
OSAID  compiledScriptID 
)

OSAComponentFunctionInline(kOSASelectStartRecording, 4); Starts recording. If compiledScriptToModifyID is kOSANullScript, a new script ID is created and returned. If the current application has a handler for the kOSARecordedText event, then kOSARecordedText events are sent to the application containing the text of each AppleEvent recorded.

Errors: badComponentInstance invalid scripting component instance errOSASystemError errOSAInvalidID errOSARecordingIsAlreadyOn OSAStopRecording()

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

◆ OSAStore()

OSAError OSAStore ( ComponentInstance  scriptingComponent,
OSAID  scriptID,
DescType  desiredType,
long  modeFlags,
AEDesc resultingScriptData 
)
 OSAComponentFunctionInline(kOSASelectLoad, 12);

 Errors:
     badComponentInstance        invalid scripting component instance
     errOSASystemError
     errOSABadStorageType:       scriptData not for this scripting

component errOSACorruptData: data seems to be corrupt errOSADataFormatObsolete script data format is no longer supported errOSADataFormatTooNew script data format is from a newer version

 ModeFlags:
     kOSAModePreventGetSource

OSAStore()

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