r/applescript • u/[deleted] • 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...
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.
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
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.
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
Nov 05 '23
Aren't python, JavaScript & standard shell scripts already providing everything you would do with AppleScript?
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.