SendAppleEvent

From Moving Light Assistant
Jump to: navigation, search

SendAppleEvent( eventClass, eventID, bundleID, actionString )

eventClass is a string. This is the four character AppleEvent class code.
eventID is a string. This is the four character AppleEvent ID.
bundleID is a string. This identifies the target application for the AppleEvent.
actionString is a string. This is the event action to send to the target application.
No Return value

THIS FUNCTION WILL ONLY WORK ON MAC OS X.
This function is only available in MLA v1.2.1 Beta 6 onwards.

This function will send an Apple Event to another application running on the same computer. If the target application supports Apple Events, you may be able to remote control the application from a script.


Example...
SendAppleEvent("VIRT", "Even", "com.PRG.Vx76", "Select + Channel 1")

This will send an Apple Event to the PRG Vx76 application telling it to add channel 1 to the selection currently on the console.