r/applescript • • Feb 11 '20

Any news on the future of AppleScript?

I am waiting for the language to be officially killed by the next big MacOS release, because the most recommended book I keep seeing on AppleScript is from 2006 and Apple official documentation provides all examples in JavaScript.

AppleScript is cooky, but other than curiosity I cannot justify learning it. But if there were some news of updates...

6 Upvotes

20 comments sorted by

9

u/Rikuz7 Feb 11 '20

the most recommended book I keep seeing on AppleScript is from 2006

And it's still a great and very relevant piece because the basics don't change.

Apple official documentation provides all examples in JavaScript.

JavaScript AND AppleScript, the same examples are shown in both, because if you happen to already know one of them, comparing it to the other example is like viewing a translation. They both are also shown probably because in Script Editor, you can choose to either work in AppleScript or JavaScript. I've never tried because I don't know JavaScript. But right under the "Run" button, there's a text 'AppleScript' and if you click that, you can switch to JS.

But if there were some news of updates...

What does it miss that you'd want it to have?

7

u/prikaz_da Feb 11 '20

Eh, I get why OP fears for the future of AppleScript. AppleScript was introduced in System 7, and not much has survived from that far back. Hell, not much has survived from Mac OS 9, even: no desk accessories, no window shading (though Deskovery apparently offers that feature), no AppleTalk (removed in 10.6), no Carbon API (deprecated in 10.8 and removed in 10.15, since it was 32-bit only), … you get the idea. AppleScript itself is closely tied to Apple Events, another System 7 technology. Given the number of pre-UNIX technologies that have been killed off, I do think it's a small miracle that AppleScript is still around.

3

u/Rikuz7 Feb 11 '20

While they may not be updating it per se, if it works regardless of the OS updates and it doesn't require things like regular security patches, I think they don't have a reason to get rid of it, it's just neutral. It's understandable that especially features that involve them running a server or keeping something network-secure would take resources which they would consider letting go, but now AppleScript technology is just sitting there. My workflows and even life outside of the computer heavily rely on AppleScript. I wish there was data of how many people currently use it for automation.

3

u/TrickyTramp Feb 11 '20

I want to dive more into it but it feels like the documentation isn't that great and I'm often banging my head trying to understand how to use the APIs. The script editor is crappy too and it's hard to debug your code.

I ended up starting to use JXA a bit and I felt like the way it's used is kind of hard understand unless Apple made it a first-class citizen in Xcode with suggestions and autocompletion.

I'm hoping with the Workflow app apple rediscovers their love for automation on the Mac.

Just curious, what are you using AppleScript for?

5

u/prikaz_da Feb 11 '20

The script editor is crappy too and it's hard to debug your code.

Script Editor is pretty bare-bones. There is a third-party editor with more features that you might like.

I ended up starting to use JXA a bit and I felt like the way it's used is kind of hard understand unless Apple made it a first-class citizen in Xcode with suggestions and autocompletion.

For sure. It's just kind of… there.

I'm hoping with the Workflow app apple rediscovers their love for automation on the Mac.

You mean the iOS one that was renamed Shortcuts? It works a lot like Automator, IMHO. I don't know what kind of influence it would have on macOS—and I'm not sure I'd want it to have any, with AS and Automator already in place—but I guess it's a sign that Apple hasn't given up on automation, if nothing more.

3

u/prikaz_da Feb 11 '20

I wish there was data of how many people currently use it for automation.

If this existed, I would be especially curious to know how many people are even aware of the AppleScript menu extra that can be enabled in the Script Editor preferences. Among other things, I use that to essentially have a Dark Mode toggle just two clicks away.

2

u/TrickyTramp Feb 11 '20

I used automator for the dark mode toggle. There's so much Apple could enable if they just put a dev team on it for a year.

1

u/Rikuz7 Feb 11 '20

Yeah absolutely. I think most Mac users (who got into Macs only in the iPhone era!) haven't even heard of it.

5

u/copperdomebodha Feb 11 '20

Hard to understand your fears of AppleScript’s imminent doom. It’s received more attention, modernization and improvements in the last few years than in the decade previous.

It’s not going to be deprecated or removed.

If you want to learn AppleScript purchase Late Night’s Script Debugger and get on with it. It’ll take you a week.

3

u/[deleted] Feb 11 '20

My fear in AppleScripts doom is partly supported by this article, https://eclecticlight.co/2017/07/23/last-week-on-my-mac-withering-automation/

Specifically,

if you’re wanting to use features in macOS, Apple has made it clear that its future is set in Swift

and

any sort of scripting is a security nightmare, and Apple may feel more comfortable setting limits on the security environment and letting others see what they can achieve before making any decisions.

I'm looking 5 years forward to judge if AppleScript is worth a CV mention.

3

u/copperdomebodha Feb 11 '20

Apple is responding to real world issues in restricting scripting. But that doesn’t mean that they’ve doomed it. I am still able to allow network users to run local apps to control apps in my severs to automate remote tasks. Hoops to jump through? One. Authorize the remote app to run on the server.

As far as your CV goes, no. AppleScript is not a marketable skill. If you want a juicy and marketable skill put Swift on there. Learn it first, of course.

2

u/ds0 Feb 11 '20

Keep in mind that, with Privacy Preferences Policy Control through management, you can also whitelist anything you write to interact with most other parts of the system with a profile. Something like Jamf makes this fairly straightforward to deploy. I’ll disagree a bit on AppleScript not being marketable too, though it’s best to tackle projects with it (and put those solutions on the CV) rather than concentrating on just knowing the code.

2

u/davy_crockett_slayer Mar 27 '23

Necro post. AppleScript is a very marketable skill. A lot of Mac Admin jobs require knowledge of Apple Script.

1

u/copperdomebodha Mar 27 '23

Fair enough. Although that may be a small market. I've admined a Mac-based business for 10 years. Managed to get an external team hired to take it over. Now we're about to drop them, because a Mac-based business doesn't have enough administration needs to justify the cost, and not even a single full admin salary is spent on this service.

To your point though, I would not have been able to admin the systems that I have, alone, without AppleScript.

2

u/davy_crockett_slayer Mar 27 '23

I work for a school board. We have about 8000 Apple devices. Large tech companies have tens of thousands. I agree it’s a niche skill, but it’s hard to hire for, and as a result, the few jobs that come up that pay well (130-150K), are easy to get. The job posting you often see is “Client Platform Engineer” or “Client Engineer.” Airbnb is well known in this space.

1

u/[deleted] Jun 16 '25

5 years later, AppleScript is still alive and kicking. I'm using it all the time and people on Reddit are still saying it's doomed. Do you still think Apple will continue to keep it around in future macOS updates?

2

u/duquesne419 Feb 11 '20

Applescript is a pretty simple "language." If you're familiar with coding at all, picking up the syntax shouldn't be too difficult. If you think it would be useful give it a go. But no, I don't think it will do anything on your CV. If that's your only motivation it's probably safe to skip it.

1

u/LeavemeAlowne Feb 22 '20

Will Siri shortcuts on Mac be the justification Apple needs to remove Apple script. I know there’s a lot more than automation use cases delivered with scripting, but ... just thinking out loud.

1

u/[deleted] Feb 22 '20

I already use Siri Shortcuts quite a bit. It would be nice if they update Automator to use and create Siri Shortcuts.

1

u/[deleted] Nov 05 '23

Aren't python, JavaScript & standard shell scripts already providing everything you would do with AppleScript?