1. 8
  1.  

  2. 9

    Droplets is one of the first things I implemented at Apple, in AppleScript 1.0 (1992). Of course the code has probably changed a lot since then! But it’s nice to know the feature’s still being used.

    1. 2

      Very nice. My first exposure to it was summer 1993. It was pure magic at the time. And once the HyperTalk interop was good (almost right away IIRC?), I got to stop maintaining 3 XFCNs I’d previously needed. I never really loved writing AppleScript-the-language, but the whole stack felt like the future. And everything I had any influence over afterwards for 15 years shipped at least a half-assed if not a three-quarter-assed sdef.

      Apple Events and the OSA let us do some pretty cool things that would have been hard to imagine in any other environment given the personnel we had.

      1. 1

        Thanks! Yeah the language … that was a struggle. I wasn’t directly involved in it (I did the Script Editor, applet/droplet support, and some glue stuff) but the whole team had lengthy debates / brainstorming about the language. The HyperTalk-like syntax was a prerequisite even before we started … but it had to be localizable, not just English-like … and extensible by every scriptable app. I think the combination of those was nearly impossible. William Cook was a genius, but the result is still what I call a “read-only language”.

        It’s too bad no one’s ever tried to do something like it again. I think with more modern tech and successive refinement, something amazing might have evolved.

      2. 2

        Thanks a ton for the feature. I’ve been using it since my first mac and I really like it. <3

      3. 3

        For most readers of this site who’d like to do the kind of thing depicted in this video, I wouldn’t recommend learning AppleScript just to do this.

        Platypus is a BSD-licensed gadget that lets you build droplets and related creatures using any language you like on Mac OS.

        IMO the strongest use case for AppleScript is controlling GUI applications. For resizing images, I’d have been more inclined to use a shell script and convert, packaged into a droplet with Platypus.

        1. 2

          For what reason(s) would it be better to use a shell script rather than AppleScript?

          1. 2
            1. The strength of AppleScript lies automating Mac applications by sending and receiving Apple Events. If that isn’t what you’re doing, it feels very stilted.

            2. The entire conceit behind the video was that it was addressing “developers” who were not familiar with AppleScript.

            So since this isn’t a task where trafficking in Apple Events helps, and it isn’t leveraging some prior knowledge of AppleScript, my instinct would be to get the UI wins that a “droplet” gives me using platypus and skip learning AppleScript just for a task like this.

            1. 3

              It wasn’t really about showing how to resize images. A single line bash script can do that as well. It was about giving a bit of a taste of AppleScript for people who have never seen it. The image resizing droplet was just a demo that was instantly relatable. There are many ways of doing this, what I showed is just another one.

              What is good about that demo is that viewers who are curious can actually type along and they don’t need to install anything on their mac. All they need is already present. If I was doing GUI scripting, then there was a chance they wouldn’t have the app installed. Maybe I’ll do some Safari scripts and share it here, that is a more complex demo.

              1. 1

                Preview can resize images. Doesn’t it have adequate OSAScript support?

                1. 1

                  I just opened the Preview dictionary here and it is surprisingly poor. I only see a bunch of standard suites. Image Events has historically been the app that was used to do such tasks, and that is why I turned to it for that demo. I have heard that Acorn has good AS support, but I don’t have a recent version to test it out.