Monday, December 17, 2018

#1 2018-09-25 08:39:20 am

nigelheinsius
Member
Registered: 2011-03-27
Posts: 7

New Mojave Mac OS - Scripts Missing Scripting Addition terms

I installed mac OS Mojave on my machine last night and now I have a bunch of missing dictionary terms in my library of scripts. An example:

I use the Satimage Scripting Additions to do regular expression searches on text.
http://www.satimage.fr/software/en/smil … yntax.html

My script lines now look like this in Mojave:
set myResult to «event SATIRPLl» "(HD)" without «class CaSe» given «class by  »:"", «class $in »:myResult

Anyone else having this problem after moving to Mojave?

Offline

 

#2 2018-09-25 09:24:31 am

alldritt
Site Admin
From:: Victoria, B.C. Canada
Registered: 2002-12-12
Posts: 34
Website

Re: New Mojave Mac OS - Scripts Missing Scripting Addition terms

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.


Mark Alldritt - Late Night Software Ltd.
support@latenightsw.com | mark@macscripter.net

Offline

 

#3 2018-09-25 09:41:27 am

billearl
Member
Registered: 2003-02-26
Posts: 32

Re: New Mojave Mac OS - Scripts Missing Scripting Addition terms

Or disable SIP (System Integrity Protection) like I did. I use Satimage and XMLLib osaxen daily.

Apple is shooting themselves in the foot with this policy IMHO.

Last edited by billearl (2018-09-25 09:46:25 am)

Offline

 

#4 2018-09-25 09:53:52 am

Yvan Koenig
Member
Registered: 2006-09-14
Posts: 3293

Re: New Mojave Mac OS - Scripts Missing Scripting Addition terms

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:

Applescript:

set myResult to change "(HD)" into "" in myResult without case sensitive

We may achieve that with :

Applescript:

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

Offline

 

#5 2018-09-25 11:06:09 am

DJ Bazzie Wazzie
Member
From:: the Netherlands
Registered: 2004-10-20
Posts: 2808
Website

Re: New Mojave Mac OS - Scripts Missing Scripting Addition terms

Yvan Koenig wrote:

Why continue to use a discarded tool when we have what we need to do the job?



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.

Offline

 

#6 2018-09-25 05:52:08 pm

nigelheinsius
Member
Registered: 2011-03-27
Posts: 7

Re: New Mojave Mac OS - Scripts Missing Scripting Addition terms

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...

Offline

 

#7 2018-09-26 01:45:24 pm

alldritt
Site Admin
From:: Victoria, B.C. Canada
Registered: 2002-12-12
Posts: 34
Website

Re: New Mojave Mac OS - Scripts Missing Scripting Addition terms

See also this post from Shane on the LNS blog:

MOJAVE BRINGS IN BIG SECURITY CHANGES


Mark Alldritt - Late Night Software Ltd.
support@latenightsw.com | mark@macscripter.net

Offline

 

#8 2018-10-12 02:43:16 pm

Jost
Member
Registered: 2005-12-12
Posts: 6

Re: New Mojave Mac OS - Scripts Missing Scripting Addition terms

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)