Mac OS X
Components Crossplatform Mac & Win Server Client Old Guides Examples
New in version: 7.3 7.4 7.5 8.0 8.1 8.2 8.3 8.4 8.5 9.0 Statistic
Checks whether AppleScript is allowed.
|Component||Version||macOS||Windows||Server||FileMaker Cloud||FileMaker iOS SDK|
|BundleID||The bundle ID of the application to control.
The target address descriptor must refer to a running application. If the target application is on another machine, then Remote AppleEvents must be enabled on that machine for the user.
|AEEventClass||The event class of the Apple event to determine permission for.
**** for wildcard to use all.
|AEEventID||The event ID of the Apple event to determine permission for.
**** for wildcard to use all.
Wether dialog can show to ask user if needed.
Pass 1 to allow dialog or 0 to disallow.
If 1, and if this application does not yet have permission to send events to the target application, then prompt the user to obtain permission. If 0, do not prompt the user.
Default is 0.
Returns OK, ApplicationNotRunning, NotPermitted, WouldRequireUserConsent, or error.
DescriptionChecks whether AppleScript is allowed.
Determines whether the current application is able to send an AppleEvent with the given eventClass and eventID to the application described as target via bundle ID.
Mac OS 10.14 and later impose additional requirements on applications when they send AppleEvents to other applications in order to insure that users are aware of and consent to allowing such control or information exchange. Generally this involves the user being prompted in a secure fashion the first time an application attempts to send an AppleEvent to another application. If the user consents then this application can send events to the target. If the user does not consent then any future attempts to send AppleEvents will result in a failure with errAEEventNotPermitted being returned.
Certain AppleEvents are allowed to be sent without prompting the user. Pass typeWildCard (****) for the eventClass and eventID to determine if every event is allowed to be sent from this application to the target.
Applications can determine, without sending an AppleEvent to a target application, whether they are allowed to send AppleEvents to the target with this function. If askUserIfNeeded is true, and this application does not yet have permission to send AppleEvents to the target, then the user will be asked if permission can be granted; if askUserIfNeeded is 0 and permission has not been granted, then WouldRequireUserConsent will be returned.
The target bundle ID must refer to an already running application.
If the current application is permitted to send the given AppleEvent to the target, then OK will be returned. If the
current application is not permitted to send the event, NotPermitted will be returned. If the target application
is not running, then ApplicationNotRunning will be returned. If askUserIfNeeded is false, and this application is not yet permitted
to send AppleEvents to the target, then WouldRequireUserConsent will be returned.
Requires MacOS 10.14 or newer.
Ask for permissions for Safari:
Ask for permissions for Finder:
Ask for permissions for Mail:
Created 13th December 2018, last changed 13th December 2018
Feedback: Report problem or ask question.
MBS Xojo tutorial videos