The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mac::AppleEvents - Macintosh Toolbox Interface to the Apple Event Manager

SYNOPSIS

        use Mac::AppleEvents;

DESCRIPTION

Access to Inside Macintosh is essential for proper use of these functions. Explanations of terms, processes and procedures are provided there. Any attempt to use these functions without guidance can cause severe errors in your machine, including corruption of data. You have been warned.

Constants: AppleEvent Descriptor Types

typeBoolean

A boolean.

typeTrue

A boolean True value.

typeFalse

A boolean False value.

typeChar

A string.

typeShortInteger

A 16 bit integer.

typeInteger
typeLongInteger

A 32 bit integer.

typeMagnitude

An unsigned 32 bit integer.

typeShortFloat

A single precision floating point number.

typeFloat
typeLongFloat

A double precision floating point number.

typeExtended

An extended double precision floating point number.

typeComp

A 64 bit number.

typeAEList

An AppleEvent list.

typeAERecord

An AppleEvent record.

typeAppleEvent

An AppleEvent.

typeFSS

A file specification record.

typeAlias

A file alias record.

typeEnumerated

An enumeration literal (4 byte character).

typeType

An AppleEvent type (4 byte character).

typeAppParameters

An application launch parameter record.

typeProperty

A property keyword (4 byte character).

typeKeyword

A keyword (4 byte character).

typeSectionH

An Edition Manager section handle.

typeWildCard

An arbitrary value.

typeApplSignature

An application signature (4 byte character).

typeQDRectangle

A QuickDraw rectangle.

typeFixed

A fixed point value.

typeSessionID

A PPC Toolbox session ID.

typeTargetID

A target ID record.

typeProcessSerialNumber

A process serial number.

typeNull

No data.

Constants: Parameter and Attribute Keywords

keyDirectObject

The direct object parameter.

keyErrorNumber

Error number.

keyErrorString

Error string.

keyProcessSerialNumber

Process serial number.

keyTransactionIDAttr

Transaction ID.

keyReturnIDAttr

Return ID.

keyEventClassAttr

Event class.

keyEventIDAttr

Event ID.

keyAddressAttr

Destination address.

keyOptionalKeywordAttr

List of optional keywords.

keyTimeoutAttr

Timeout limit.

keyInteractLevelAttr

Interaction level.

keyEventSourceAttr

Event source address.

keyMissedKeywordAttr

List of mandatory keywords not used.

keyOriginalAddressAttr

Original source address.

keyPreDispatch

Install handler before dispatching.

keySelectProc

Enable/Disable OSL.

keyAERecorderCount

Number of processes recording AppleEvents.

keyAEVersion

AppleEvent Manager version.

Constants: Core AppleEvent Suite

kCoreEventClass

Core Suite Event class.

kAEOpenApplication

Open application without documents.

kAEOpenDocuments

Open documents.

kAEPrintDocuments

Print documents.

kAEQuitApplication

Quit application.

kAEAnswer

AppleEvent answer event.

kAEApplicationDied

Launched application has ended.

Constants: Miscellaneous

kAENoReply
kAEQueueReply
kAEWaitReply
kAENeverInteract
kAECanInteract
kAEAlwaysInteract
kAECanSwitchLayer
kAEDontReconnect
kAEWantReceipt
kAEDontRecord
kAEDontExecute
kAEInteractWithSelf
kAEInteractWithLocal
kAEInteractWithAll

AppleEvent sendMode flags.

kAENormalPriority
kAEHighPriority

AppleEvent priority values.

kAEStartRecording
kAEStopRecording
kAENotifyStartRecording
kAENotifyStopRecording
kAENotifyRecording

Recording events.

kAutoGenerateReturnID
kAnyTransactionID
kAEDefaultTimeout
kNoTimeOut

Special values for return ID, transaction ID, and timeout.

kAENoDispatch
kAEUseStandardDispatch
kAEDoNotIgnoreHandler
kAEIgnoreAppPhacHandler
kAEIgnoreAppEventHandler
kAEIgnoreSysPhacHandler
kAEIgnoreSysEventHandler
kAEIngoreBuiltInEventHandler
kAEDontDisposeOnResume

Options for AEResumeTheCurrentEvent().

Variables

%AppleEvent

An array of application-wide event handlers.

   $AppleEvent{"aevt", "odoc"} = \&OpenDocument;
%SysAppleEvent

An arrary of system-wide event handlers.

AEDesc

AEDesc is a Perl package that encapsulates an AppleEvent Descriptor. It uses the OO methods of Perl5 to make building and parsing data structures easier.

new TYPE, HANDLE
new TYPE, DATA
new TYPE
new

Create a new AppleEvent descriptor. Sets the type and data to TYPE (default is 'null'), and HANDLE or DATA (default is empty).

        $desc = new AEDesc("aevt", $event);
type TYPE
type

Return the type from the AEDesc structure. If TYPE is present, make it the new type.

data HANDLE
data

Return the data from the AEDesc structure. If HANDLE is present, make it the new data.

get

Return the data of the AEDesc structure in a smartly unpacked way.

AEKeyDesc

AEKeyDesc is a Perl package that encapsulates an AppleEvent keyword. It uses the OO methods of Perl5 to make building and parsing data structures easier.

new KEY, TYPE, HANDLE
new KEY, TYPE, DATA
new KEY, TYPE
new KEY
new

Creates a new AppleEvent keyword descriptor. Sets the keyword, type and data to KEY (default is zero), TYPE (default is 'null'), and HANDLE or DATA (default is empty).

key KEY
key

Return the keyword of the AEKeyDesc structure. If KEY is present, make it the new keyword.

type TYPE
type

Return the type from the AEKeyDesc structure. If TYPE is present, make it the new type.

data HANDLE
data

Return the data from the AEKeyDesc structure. If HANDLE is present, make it the new data.

get

Return the contents in a smartly unpacked way.

AUTHOR

Written by Matthias Ulrich Neeracher <neeracher@mac.com>, documentation by Bob Dalgleish <bob.dalgleish@sasknet.sk.ca>. Currently maintained by Chris Nandor <pudge@pobox.com>.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 1266:

Unknown directive: =include