NewAppleEvent Function

Creates a new AppleEvent class object.

Syntax
result = NewAppleEvent( EventClass, EventID, creatorCode )

Parameters
EventClass | String | The four letter AppleEvent class code.
EventID | String | The four letter AppleEvent ID.
creatorCode | String | The four letter creator of the application the AppleEvent will be sent to.

Return Value
Result | AppleEvent | The new AppleEvent object.

# Notes

Use this function to create a new AppleEvent to send data to another application. The EventClass and EventID together uniquely define a particular AppleEvent. The EventClass acts as a category for logically grouping events together. While there are many standard (and even some required) AppleEvents, many applications have several custom AppleEvents for performing actions specific to the application. Consult the application's documentation or its author to get information on what custom AppleEvents may be available. If you pass a blank string for the CreatorCode, the event will be "sent to self."

Once you create the AppleEvent object and populate the necessary parameters with data, you then send the AppleEvent to the target application using the AppleEvent object's Send method.

# Examples

See the AppleEvent class for an example of creating and sending an AppleEvent.

# See Also

AppleEvent class.