Safari 9.1.1 and AppleScripts - 05/20/16 06:04 AM
A long time ago, dkmarsh kindly posted this neat little AppleScript that copies the URL of your current Safari page to your clipboard...
Today, out of the blue, the script stopped running, with this cryptic entry in Consolebeing my only indication of why.
I invoke the script with a Butler hotkey, so I immediately suspected it as the culprit, but all my other scripts ran as expected.
I then began experimenting by recompiling the script and saving it to my scripts menu, but with the same unexplained non-fuctionality.
Next, since both failed instances were invoked via "3rd parties", I tried saving the script as an app, and BINGO!
The first time I tried to run it I got this pop-up, and, indeed, enabling the option (and authenticating) restored my hot key to functionality.
A new wrinkle in Safari 9.1.1, I guess, although I can't guess its purpose.
(Safari's Develop menu can be installed in your menu bar via Safari > Prefs > Advanced > Show Develop menu in menu bar.)
Code:
tell application "Safari" activate set {theURL, theTitle} to {URL of document 1, do JavaScript ¬ "document.title" in document 1} set theText to "[url=" & theURL & "][color:blue]" & theTitle & "[/color][/url]" set the clipboard to theText end tell
Today, out of the blue, the script stopped running, with this cryptic entry in Console
Quote:
5/20/16 2:40:25.314 AM Console[8743]: SecTaskLoadEntitlements failed error=22
I invoke the script with a Butler hotkey, so I immediately suspected it as the culprit, but all my other scripts ran as expected.
I then began experimenting by recompiling the script and saving it to my scripts menu, but with the same unexplained non-fuctionality.
Next, since both failed instances were invoked via "3rd parties", I tried saving the script as an app, and BINGO!
The first time I tried to run it I got this pop-up, and, indeed, enabling the option (and authenticating) restored my hot key to functionality.
A new wrinkle in Safari 9.1.1, I guess, although I can't guess its purpose.
(Safari's Develop menu can be installed in your menu bar via Safari > Prefs > Advanced > Show Develop menu in menu bar.)