AppleEvent.Constructor(EventClass as String, eventID as String, BundleID as String)
From Xojo Documentation
| This method is only available on the macOS platform.
For cross-platform compatibility, use ＃If...＃Endif with the Target... specifiers to make sure you will not attempt to use this method on an incompatible platform.
Creates a new AppleEvent. EventClass is the four character AppleEvent class code. EventID is the four character AppleEvent ID. BundleID identifies the target application for the AppleEvent.
Use this constructor instead of the deprecated NewAppleEvent function. (Note that the BundleID parameter of this constructor is not the same as the OSType parameter of the deprecated NewAppleEvent function, even though both are Strings.)