
Ask HN: What are you using AppleScript for? - brunoc
Considering how popular MacOS laptops are with developers, it&#x27;s curious to me that I haven&#x27;t come across much usage of AppleScript.<p>I use it to hook up various actions to the TouchBar with BetterTouchTool (https:&#x2F;&#x2F;folivora.ai&#x2F;) and have done some iTunes related scripts in the past to clean up or improve my library.<p>Are you doing anything useful &#x2F; fun with AppleScript?
======
feep
I used it (well, Apple events, lower in the AppleScript stack) to generate
piles of PDFs for from Quark for clients. Later book automation.

It was super handy for that sort of thing.

Sort of miss it, in a maybe-masochist kind of way.

Open tools to HTML are much nicer. And much less bizarre.

If anyone has some hairy InDesign or Quark or Illustrator thing they need
automated, let me know.

...

...personally? lots of useful hotkeys.

But the shit keyboards finally drove me away. Linux on a XPS13 now.

I don't miss AppleScript the language. But I do miss the fact that it was
sorta built into everything by default.

~~~
leemailll
I use Illustrator lightly for 10 years but never know it support Applescript,
will take a look at it.

~~~
feep
If you're entirely within Illustrator, you're probably better off using
Adobe's javascript API. Better cross-platform, better language, faster (less
process switching overhead).

It has pretty good AppleScript coverage (from looking at the dictionary) but
I've never used most of it.

Mostly used AppleScript to call 'do javascript'.

~~~
leemailll
I know JS part for years, but never read anything about Applescript. Thanks
for the heads-up, I guess I'll pass it for now

~~~
feep
Good plan.

The AppleScript support was there maybe even before Illustrator was available
for Windows.

Not going to look at either API. And, I don't have a current Illustrator.

...but I can guess with certainty that the javascript API gets more attention
within Adobe. And that it has a more solid future.

AppleScript may never disappear from Illustrator or macOS. But it _does not_
have a bright, vibrant future.

------
hhas01
Spent the last few years developing my own end-user automation language for
rendering templated artworks in Adobe Illustrator. Not written in AppleScript,
mind (that language is a junker), but driving AI via the same Apple event
interface that AppleScript talks to. Insanely powerful stuff.

Currently reimplementing Carbon AEDescs in pure Swift, to see if a modern
high-level IPC framework that works across macOS, iOS, _and_ Marzipan apps is
feasible.
([https://twitter.com/hhas02/status/1124763874413174786](https://twitter.com/hhas02/status/1124763874413174786))

Developers generally hate AppleScript because it deliberately misleads them
into believing Apple event IPC is OOP, then drives them absolutely nuts by
acting in all sorts of very un-OO ways. However, once you realize that it’s
not OOP at all, but RPC plus simple first-class relational _queries_ … oh the
possibilities. Interesting times.

------
eeeeeeeeeeeee
I use it to control some Spotify actions assigned to keyboard shortcuts via
Alfred.

------
leemailll
mostly use AppleScript with iTunes, such as rating songs playing with Alfred
and various Doug's AppleScript for itunes. Actually I learn AppleScript by
tuning Doug's script for my own needs.

------
KiDD
Mostly just glue type stuff.

