Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

is applescript dead

I read yesterday that applescript is dead due to Swift being created. I love applescript and need a way to write scripts to open folders, place and size folders, generate emails. These things made my work life fly by NOT having to click 20 times to open a folder. Will Swift let you write code to do what applescript has the ability to do. I wish Apple would further develop applescript.

Posted on Jun 23, 2015 6:39 AM

Reply
13 replies

Oct 8, 2018 1:12 PM in response to FCPeditor

I don't think AppleScript is dead as long as applications continue to support it, as they did add Database Events (for working with SQLite databases) and some limited XML support to System Events in the last iteration and made significant updates to AppleScript application creation in Xcode. There is also the return of AppleScript support to the iWork applications to consider (they had taken support out of Numbers for at least one version before bringing it back). There's still plenty of demand for AppleScript support that they would be stupid to take it out.


More than likely they're looking to adopt the same approach Microsoft has with the Windows Scripting Host, which allows code in both VBScript and JavaScript.

Jun 23, 2015 11:30 AM in response to FCPeditor

A scripting language is NOT a compiled language. Swift and Applescript are worlds apart in what they do and the goals they are trying to achieve.


Swift is for writing applications from the ground up.


Applescript is for interacting with applications to automate what they do, along with acting as a glue that uses the functions of several applications to perform some goal.


While you might be able to write that in Swift, it would be a lot more code, and you would need to be a software programmer to do it. If you are a software programmer, then for you, Swift might be a replacement for Applescript, otherwise, "No", it is not.


Speaking as someone that writes software for a living (unfortunately not for Apple products 😟 )

Jun 23, 2015 5:01 PM in response to FCPeditor

@FCPeditor:


Not dead. Certaintly moribund. Massively overdue for replacement with something much more modern and less flaky. I don't think Apple cares enough about traditional 'pro' users to do much about it, as that's just not a core market for them any more. If Apple does decide to pull the plug on it, it'll be because they've concluded they can make more money focusing their attentions on more restrictive - but also far more widely accessible, and thus potentially profitable - consumer-oriented technologies like Siri. But hey, it's their toy. They can do what they like.


@BobHarris:


tell application "iTunes" to set faves to name of every track of playlist "Top 25 Most Played" -- AppleScript


let faves = try iTunes().playlists["Top 25 Most Played"].tracks.name.get() // Swift

Jun 24, 2015 7:27 AM in response to FCPeditor

thanks guys, I have been applescripting since 2000 and am pretty good at it. My work made me go PC so I learned Auto Hot Key. Its very easy to learn. You can add buttons to an interface. Like I used to be able to do with Applescript studio. Make and interface, add a button, button runs a script that opens a folder. Thats all I want. They had it, then they took it away. At least I can write a script and put in it in the menu bar...................an easy to build GUI would be really Apple like, no.

Jul 28, 2015 8:59 AM in response to Community User

[Note: I'm reposting this because heavy-handed neurotic mods nuked my *entire reply and everything after it* because, apparently, including a couple URLs to 1. the AppleScript book I co-wrote to prove I know what I'm talking about here, and 2. my own AppleScript work to demonstrate just how fantastically powerful this technology is when done right, constitutes "advertising". Note that I make no money from that book - my 5% goes directly from publisher to charity - and all my linked code is open-source, so I do not get compensation, financial or otherwise, from it.]



@Steven: Bit late to the party, but anyway...


Corrections: Database Events (which is a simple key-value object store, not an SQL bridge) and System Events' XML suite have been around since 10.3 or so, and AppleScriptObjC (for writing AS-based apps in Xcode) since 10.6.


The only 'significant' change in 10.10 was the addition of JavaScript for Automation, which is crappy and broken, has virtually zero documentation,support, or promotion, utterly fails to leverage existing JS technologies like Node.js and npmjs.com, and has next to no users or community expertise as a result. Given the immense popularity of JavaScript and its rapid expansion into server and desktop domains, shipping JXA as DOA is no small achievement, but somehow the AS team managed it anyway.


The Apple event/Apple Event Object Model architecture is arcane, archaic, hopelessly underspecced, ubiquitously misunderstood, and a problematic fit for modern sandbox-based OSes at best. Worse, it isn't available on iOS, nor will it be. The only thing that surprises me is that Apple hasn't yet appointed XPC Services as its replacement: while it lacks the elegant UX/UI philosophy (at least on paper) of AEOM, it is more modern, much simpler, far more "programmer friendly", built for sandboxing, and available on iOS as well as OS X.


The Open Scripting Architecture plugin system, which in theory allows applications to run scripts written in any OSA-compatible language (analogous to WSH) is a great idea, a lousy implementation, and a total failure to deliver on that promise, being a miserable fit for any language not already called AppleScript. It should've been taken out and shot years ago, and a modern, capable replacement introduced back when Apple still gave a **** about supporting third-party scripting.


As to the AppleScript language itself, it is a deeply flawed, painfully dated experiment in end-user language design, a developmental and evolutionary dead-end that is well into the long tail section of its lifecycle. There is no future in it as a scripting language, and with Apple's focus now on delivering a secure, polished, canned consumer experience rather than flexible, open-ended platforms that users can extend and customize to suit themselves, I am deeply skeptical that we'll see a successor to it. Heck, I recently put out an Apple event bridge for Swift and got only crickets. If adopters of Apple's massive new hotness have no interest in AE-based automation, then who will?

Jul 28, 2015 10:29 AM in response to hhas

I came back here wanting to reread your original posts, and was puzzled to find them missing. Didn't notice much "advertising" in them. Thanks for reposting some of your points.


AppleScript is long in the tooth and an imperfect tool for a professional developer. But maybe one of the reasons it's survived so long is that it's immensely useful for non-programmers like me. Hope Apple keeps it around, and also improves JavaScript for Automation. And provides a path for more automation in iOS as well. Workflow, Launch Center, and Drafts are a start.


SG

Feb 27, 2016 3:45 PM in response to hhas

As a former HyperCard fanatic, I can appreciate the disappointment with Apple's myopic focus on revenue-driven development. Not that this isn't important – it is but there are other kinds of developers and supporting them ALSO elevates the Apple ecosystem.

There are many who develop purely for the challenge of making something useful. Whether they use AppleScript, Automator, HyperCard, iAd Producer, iBooks Author or some third party product (HyperStudio, Hype, etc.) is immaterial. Apple needs to support all who would develop for the platform regardless of what drives them to do so.

I do appreciate the work of the folks at https://macosxautomation.com/ which is emphatically NOT an Apple sponsored site. Check them out.

is applescript dead

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.