MacOS Mojave removes all support for non-Apple scripting additions. You’ll need to find alternatives for all the Scripting Addition commands used in your scripts.
Why continue to use a discarded tool when we have what we need to do the job?
When Satimage is active, the offending instruction reads:
set myResult to change "(HD)" into "" in myResult without case sensitive
We may achieve that with :
use AppleScript version "2.3.1"
use scripting additions
use framework "Foundation"
my changeCaseInsensitive("aaa (HD) bbb (Hd) cc", "(HD)", "")
on changeCaseInsensitive(aString, |before|, |after|)
set aString to (current application's NSString's stringWithString:aString)
set aString to (aString's stringByReplacingOccurrencesOfString:|before| withString:|after| options:(current application's NSCaseInsensitiveSearch) range:{0, aString's |length|()}) as text
end changeCaseInsensitive
CAUTION, the final coercion as text is required because, without it we would get something like :
«class ocid» id «data optr000000009002250040600000»
Code borrowed to Nigel GARVEY.
Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) mardi 25 septembre 2018 17:51:55
Why would you accept the fact that Apple tries to make you dumber and shrink the playground for your creativity?
The playground behind the OSAX is huge compared to the limited ASObjC. Chris, the famous AppleScript engineer on the AppleScript mailing list, was very clear that ASObjC nor Scripting Libraries are a replacement for OSAXen and should never considered to be one. Because ASObjC is very dumbed down compared to OSAXen I can only agree with Chris. We don’t have an replacement for OSAX’en (yet) which forces me and other users to “continue to use a discarded tool”.
And if it’s really for security reasons we’re in big trouble, ASObjC is using similar hacks.
MacOS Mojave removes all support for non-Apple scripting additions. You’ll need to find alternatives for all the Scripting Addition commands used in your scripts.
Seriously?
System Integrity Protection sounds suspiciously like “We only want our software on these machines”
Well, I already gave the boot to my iPhone. Traded it in for a Samsung phone which I find WAY better than the iPhone.
Maybe the Mac is my next casualty.
I love Applescript, always have. But friends, it is dying…