Discussion:
Mojave vs. AppleScript
(too old to reply)
Michal L. Wright
2018-10-30 23:25:23 UTC
Permalink
My Mac database app includes a “Grab Web Address” function that uses AppleScript to get the URL and window name of the current tab from a variety of browsers. The URL and name are then pasted into a newly created record.

It worked with Demeter, Google Chrome, iCab, OmniWeb, Opera, Safari, Vivaldi, and Yandex. The appropriate scripts are generated on the fly, to work with the frontmost open browser.

The app uses Developer ID distribution, and is not sandboxed.

This function no longer functions under Mojave.

The Mojave 10.14 release notes web page <https://developer.apple.com/documentation/macos_release_notes/macos_mojave_10_14_release_notes> says:

Sending Apple events from an app—including script applets—now requires user approval. The list of currently approved apps can be viewed and edited in the Automation category in the Privacy tab in System Preferences > Security & Privacy. If an event is blocked because the user didn’t approve that app, the event will fail with the error code: -1743 ("<sender>: Not authorized to send Apple events to <target>"). An event can be preflighted using AEDeterminePermissionToAutomateTarget(_:_:_:_:) <https://developer.apple.com/documentation/coreservices/3025784-aedeterminepermissiontoautomatet>.

The developer documentation of AEDeterminePermissionToAutomateTarget provides no overview.

I’ve done some searching and found some discussions, and tried some ideas. I added a Privacy - AppleEvents Sending Usage Description item to my info.plist.

AEDeterminePermissionToAutomateTarget produces an errAEEventNotPermitted.

Then I call [getURLscript executeAndReturnError:&URLerrorInfo], I get the following runtime error:

iData Pro[18598:682248] skipped scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" because it is not SIP-protected.

I was hoping to find more on line, but haven’t spotted anything useful.

Any ideas?

Thanks,
Mike Wright
_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.na
Shane Stanley
2018-10-30 23:53:35 UTC
Permalink
Post by Michal L. Wright
iData Pro[18598:682248] skipped scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" because it is not SIP-protected.
Unless you're actually calling something that uses Adobe Unit Types.osax, that message is probably a red herring. Try removing Adobe Unit Types.osax -- AFAIK it hasn't done anything for years anyway.
--
Shane Stanley <***@myriad-com.com.au>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>


_______________________________________________

Cocoa-dev mailing list (Cocoa-***@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/gegs%40ml-in.narkive.net

This email sent to ***@ml-in.narkive.net
Continue reading on narkive:
Loading...