Monthly Archives: May 2017

Master for iTunes Droplet - Fixed!

In what may be a first for me, Apple just resolved the bug report I filed back in January regarding a problem with the Master for iTunes Droplet.

The root of the problem was that the OS version was being compared to a regular string of 10.6, instead of being compared as a numeric string. The result was that 10.10 was returning false when checked with is less than "10.6" then.

The bug report I filed included my suggested fix, so I was curious to see what they implemented. Here’s the relevant section of code:

set systemVersion to system version of (get system info)
considering numeric strings
    if systemVersion is less than "10.6" then
        log ("ITUNESMASTERINGDROPLET: incompatible system version")
        display alert SYSTEM_CHECK_ERROR_TITLE message SYSTEM_CHECK_ERROR_MESSAGE as warning buttons {CANCEL_BUTTON_TITLE} default button 1
        log ("ITUNESMASTERINGDROPLET: shutting down")
        error number -128
    end if
end considering

Their fix is slightly more elegant than what I suggested, but it’s fundamentally the same. They also addressed the problem with Gatekeeper rejecting the droplet.

The updated droplet is available for download now.

I’m beginning to think that my wrist strain on this new MacBook Pro isn’t due to the keyboard, but the gigantic trackpad - and the lack of a place to rest my palm.

macOS Notification Center Scripts

After listening to a recent Mac Power Users episode on notifications, I decided it was finally time to reduce the flood of notifications I get on my Mac. I realized that the biggest obstacle for me with notifications on the Mac is the inconsistent behavior when I two-finger-edge-swipe to open the notification center: sometimes I get the Today view, and sometimes I get the Notifications view, depending on what I was last looking at it.

There doesn’t seem to be a keyboard shortcut you can use to toggle between the Today and Notifications tabs, so I decided to script it. As a starting point, I found this Stack Overflow answer, but the Applescript didn’t work on Sierra. This answer provided the information I needed to debug the first script; it turns out that the "Notification Center" item moved from menu bar 2 to menu bar 1 with an OS update.

This is the script I ended up with to show the Today tab:

tell application "System Events" to tell process "SystemUIServer"
    click menu bar item "Notification Center" of menu bar 1
end tell

tell application "System Events" to tell process "NotificationCenter"
    click radio button "Today" of radio group 1 of window "NotificationTableWindow"
end tell

And this is the script for the Notifications tab:

tell application "System Events" to tell process "SystemUIServer"
    click menu bar item "Notification Center" of menu bar 1
end tell

tell application "System Events" to tell process "NotificationCenter"
    click radio button "Notifications" of radio group 1 of window "NotificationTableWindow"
end tell

I’ve tied these gestures in Better Touch Tool, and I can also fire them off from LaunchBar.

As a former Cambridge resident, the least believable part of The Handmaid’s Tale is the size of her closet.