THIS WEEK'S SPONSOR:

SignEasy

The Easiest Way to Sign and Send Documents for Signature


Posts tagged with "applescript"

iPad Diaries: Using a Mac from iOS, Part 1 – Finder Folders, Siri Shortcuts, and App Windows with Keyboard Maestro

iPad Diaries is a regular series about using the iPad as a primary computer. You can find more installments here and subscribe to the dedicated RSS feed.

After several years without updates to a product that, somewhat oddly, “remained in Apple’s lineup”, the Mac mini was revived by the company last November with a major redesign geared toward pro users and designed for flexibility. As listeners of Connected know, one of the show’s long-running jokes was that I would buy my last Mac ever as soon as Apple released a new Mac mini1; when it happened, I took the opportunity to completely rethink my home office with a new desk, well-specced Mac mini, and 4K display that supported both modern Macs and iPad Pros via USB-C.

Effectively, I had never owned a desktop Mac until2 this Mac mini arrived. I always preferred portable Macs to workstations, and over the years I moved from a late 2008 MacBook Pro to a 2011 MacBook Air and, in 2015, back to the (now Retina) MacBook Pro again. Over the past couple of years, however, and particularly since the introduction of iOS 11, my penchant for Mac laptops started clashing with the realization that the iPad Pro had become my de-facto laptop. I was using a MacBook Pro because I thought I needed a portable Mac machine just like when I started MacStories in 2009; in reality, the iPad had been chipping away at the MacBook’s core tasks for a while. Eventually, I saw how my MacBook Pro had become a computer I’d open twice a week to record podcasts, and nothing more.

With the iPad Pro as my primary computer, the Mac’s role in my life evolved into a fixed environment that was necessary for multi-track audio recording and Plex Media Server. And as I shared on Connected on several occasions, I realized that my workflow in 2018 wasn’t the same as 2009 anymore: it no longer made sense for me to have a Mac laptop when what I really needed was a small, but powerful and extensible Mac desktop. That’s why I started waiting for a new Mac mini, and my wishes were granted with the 2018 relaunch of the mighty desktop machine.

For the past three months, I’ve been busy setting up the Mac mini and optimizing it for the tasks that inspired its purchase. I bought external SSD drives (these two) to use for Plex and Time Machine backups; I set up a homebridge server to add unsupported accessories to HomeKit (such as our 2017 LG TV) and turn iTunes playlists into HomeKit scenes; I rethought my podcasting setup (I now have a Zoom H6 recorder and a taller microphone stand) and arranged my desk to make it easier to use the same UltraFine 4K display with the Mac mini and iPad Pro (I just need to plug in a different USB-C cable). Because this Mac mini is fast enough to handle 4K transcoding for Plex without breaking a sweat, I started using youtube-dl to enjoy 4K YouTube videos on iOS devices with the Infuse or Plex apps. I’m trying to take advantage of a powerful, always-on Mac server in any way I can, and I’m having lots of fun doing it.

This doesn’t change the fact that the iPad Pro is my main computer, and that I want to interact with macOS as little as possible. Aside from recording podcasts using Mac apps, I rely on the Mac mini as a server that performs tasks or provides media in the background. Any server requires a front-end interface to access and manage it; in my case, that meant finding apps, creating shortcuts, and setting up workflows on my iPad Pro to access, manage, and use the Mac mini from iOS without having to physically sit down in front of it.

In this multi-part series, I’m going to cover how I’m using the 2018 iPad Pro to access my Mac mini both locally and remotely, the apps I employ for file management, the custom shortcuts I set up to execute macOS commands from iOS and the HomePod, various automations I created via AppleScript and Keyboard Maestro, and more. Let’s dive in.

Read more


  1. It was funny because everybody thought the Mac mini line was done. ↩︎
  2. Many years ago, I did use an iMac for a few months. However, I never considered that machine truly mine – it was set up at my parents’ house (where it now sits unused) and I worked on it for a while until I moved in with my girlfriend a few months later. ↩︎

AppleScript, the Perfect Adjunct to iTunes

Kirk McElhearn, writing for Macworld on automation in iTunes following Sal Soghoian’s departure from Apple:

No application can do everything its users need, and none should offer everything they want. For this reason, AppleScript has long been the perfect adjunct to iTunes, which is already feature-rich (some say “bloated,” but I disagree), and doesn’t need more options and tools. Many of these AppleScripts are designed to tag files, edit their metadata to correct errors, improve consistency, and ensure that users can find the files they want, and help them efficiently use smart playlists.

It’s not clear whether the termination of Mr. Soghoian means the demise of AppleScript altogether, and particularly in iTunes, but many developers, iTunes users, and others are concerned by this decision.

You see, it’s all about freedom. Freedom to do things we want that Apple doesn’t think we need to be able to do. Freedom to explore. Freedom to discover new ways to link applications, to interact with files, to create our own solutions. We can’t expect apps to cater to all our whims, and tools like AppleScript and Automator allow us to go a step further and discover ways to do things that Apple never even considered.

Losing AppleScript and automation features altogether would be a horrific loss for the Mac. However, I don’t think that’s going to be the case. Like Jason Snell, I believe today’s Apple finds this stuff uninteresting and “vintage”; rather than removing it, I feel like they’ll stop pretending they care about it, just as they did for Dashboard. Which isn’t an ideal scenario either, but between two poisons, it’s the one I’d pick.

See also: Dr. Drang back in 2013, ‘When and why I automate’.

Permalink

More On The AppleScript Improvements In Latest iWork Update

With yesterday’s update of the iWork suite for OS X, Apple reintroduced several AppleScript functionalities that had been removed in October, and brought new scripting features to Pages, Numbers, and Keynote as well.

Ben Waldie published an overview of the changes at Macworld, noting that the AppleScript improvements aren’t only focused on additions: Apple is now using a consistent AppleScript dictionary that should allow scripts to be easily reused across all iWork apps.

What’s especially interesting is that these suites are consistent from app to app. In other words, since all the apps have certain features in common, the same exact AppleScript terminology is used to script those features. This is huge: It means that if you write a script that builds a table or chart in Numbers, you can change the app name in your code to Keynote and your script should “just work” in Keynote. Want to add an image, replace some text, change the volume of every movie in a document? The code you write is the same for any of these tasks, regardless of which app you’re targeting.

When Apple relaunched iWork last year, they stressed how the apps had been rebuilt with full 64-bit support and a new unified file format. The return of AppleScript in iWork seems to highlight – as Waldie notes – a collaboration between different teams at Apple to improve consistency between apps, data exchange, and scripting features.

It took six months, but AppleScript appears to be alive and well at Apple. It may not be a priority anymore, and there’s no denying that Apple put power users through a rough transition last year, but the new scripting capabilities of the iWork apps are fairly impressive and it sounds like there’s still room for improvement.

Permalink

Apple Updates iWork Suite with Design Tweaks, New Features, Sharing Improvements

In a series of updates rolled out today across iCloud.com, the App Store, and the Mac App Store, Apple updated its iWork suite of apps with design changes in the document editor, new templates, improved Retina display support, and several individual enhancements to Pages, Numbers, and Keynote.

On iCloud.com, the three web apps (which were last updated in January) have all received improved Retina display support and the possibility of opening documents directly from links in iCloud Mail. The document editor’s design has been refreshed, and documents shared from iCloud.com can now be set to a view-only mode that won’t allow recipients to edit them; previously, shared documents could always be edited by multiple users with access to a document’s link.

Apple brought specific changes to each web app as well, such as improved popup menu support in Numbers and new templates, better text wrap, and the possibility to edit charts in imported documents in Pages. Read more


Mixed AppleScript Signals

Dr. Drang:

As for spreadsheets and presentation software, the only competition I’m aware of is Excel and PowerPoint from the MS Office suite. I’ve never used PowerPoint and haven’t used Excel in almost 20 years, but David Sparks says their AppleScript support was better than iWork’s even before the purge. Now Apple is essentially pushing its power users toward Microsoft. It’s a funny world.

Permalink

AppleScript Support Effectively Gone From New iWork Apps

Clark Goble notes that, with the new iWork apps released yesterday, the AppleScript dictionary included in them has been so slimmed down it’s basically gone. He has screenshots showing the regression, and he concludes:

What I suspect Apple doesn’t realize is how much small business and small shops workflow depends upon AppleScript. Casual use is fine. But a lot of people do more. It wouldn’t be so bad were there an alternative. This isn’t just like Apple not upgrading the Mac Pro. This is like Apple not upgrading the Mac Pro for four years, then announcing that the Mac Mini is the new Mac Pro. And discontinuing FCPX, Aperture, and its other pro apps and telling you to use iPhoto and iMovie.

It’s baffling that the same company that brings these automation enhancements cuts AppleScript support in other Mavericks apps. Maybe the iWork team didn’t have the time to rework AppleScript support for the new apps. However, as Dr. Drang notes, it’s strange that AppleScript has been removed from apps that once had it.

I hope that Apple will put AppleScript back in a future update to iWork. I don’t want to think that Apple just doesn’t care about consumer apps also used by advanced users (with higher needs) anymore.

 

Permalink

AppleScript, Automator, and Automation Improvements in Mavericks

I have been using Mavericks for a little while now and I have to admit that I was a little slow to get excited about this release of OS X. Once I started to sink my teeth into some of the power-user features, though, it didn’t take long for me to really get sucked into trying out every new geeky addition, specifically all of the new AppleScript features.

I will be the first to admit that AppleScript is not my favorite language and I only ever use it when I absolutely have to, but, with the release of Mavericks, Apple has added some very compelling reasons to give it another chance. I was recently discussing AppleScript with a developer friend of mine, and we agreed that since Apple had begun stripping out some script-related functionality of core apps like iTunes, it would not be surprising if the language was slowly phased out of any upcoming OS releases. However, I was wrong. In a surprising turn of events, Apple decided to breath new life into AppleScript and make it easier than ever to write clean and reusable scripts. Read more


AppleScript XML-RPC

Daniel Jalkut:

My mind was fairly well blown this morning to learn that for more than ten years, AppleScript on Mac OS X has included a built-in command for communicating with XML-RPC and SOAP endpoints on the web.

I had no idea this existed either. Following Daniel’s example script, I have put together a Keyboard Maestro macro that, with a single hotkey, gets the latest post from MacStories, shortens its URL, and tweets it with Tweetbot. It’s the Mac version of my Editorial workflow, and I’ll share it soon.

Permalink