dougscripts.com

Archive for the
‘iTunes 12.6’ Category

May 23 '17 - 7:54 pm
iTunes 12.6.1 Updated

Apple released iTunes 12.6.1.25 just about a week ago. Now build version 12.6.1.27 is available from the App Store app’s Updates pane.

I believe this is the third time a release has been updated with a minor build shortly after its initial release.

May 22 '17 - 12:00 pm
Unable to Donate

It is possible that a recent change in the operating system may affect the ability to make an in-app donation in several scripts. These will be scripts that have the “nag” screens; when quitting, you may be unable to access PayPal when clicking the “I’ll Donate” button. Instead, the script will simply quit.

I am working on updates. Thanks for your patience.

May 19 '17 - 8:15 am
iTunes Folder Missing?

A couple of Correspondents have reported that fresh installations of Sierra do not have a “iTunes” folder in the User Library folder (~/Library/iTunes/). Traditionally, this folder contains the “iTunes Plug-Ins” folder and the “Scripts” folder (see my Download FAQ page for more details). Additionally, some third-party apps may use this folder for caching their own iTunes-related files. However, the “Scripts” folder is not created automatically and needs to be created by the user; and I believe Apple has lately inhibited the use of third-party visualizers such that the “iTunes Plug-Ins” folder may no longer be necessary. Perhaps, therefore, the ~/Library/iTunes/ folder is not created automatically anymore either.

To repeat: this seems to affect clean installs of the latest Sierra and iTunes 12.6 and later. If you already have these folders configured on your machine they will not disappear when you upgrade the operating system—at least, that’s been my experience.

iTunes still looks for AppleScript files in this location to make them available in its Script menu, so if your system isn’t configured with the ~/Library/iTunes/ folder you will have to create the intermediate “iTunes” folder there and then the “Scripts” folder within it.

AppleScripts can also be installed in the /Library/iTunes/Scripts/ folder—that’s the [startup disk]/Library/ folder and putting AppleScripts here makes them available to all Users. Again, the “Scripts” folder may have to be created by the user.

AppleScripts will appear in the system-wide Script menu in the Menu Bar when they are installed in ~/Library/Scripts/Applications/iTunes/ for the single User or /Library/Scripts/Applications/iTunes/ for all Users.

March 29 '17 - 11:52 am
Current Scripts and Playlist Window

While I like having playlist windows restored in iTunes 12.6, their return is somewhat problematic for many of my scripts. As I mentioned in an earlier post, I spent a few years stripping out references to playlist window in many scripts, particularly the ones that need to access a selection of tracks. In many cases, these scripts can only recognize tracks selected in the main window (the browser window) and cannot recognize a selection of tracks in a playlist window.

I’m updating scripts to accommodate playlist window track selection, but this will take some time to roll out.

In the meantime, be aware that some scripts will need you to select tracks in the main iTunes window. Tracks selected in a playlist window will be ignored.

March 28 '17 - 2:54 pm
Close a Playlist Window and Select Its Playlist

If it really drives you crazy that after closing a playlist window iTunes is compelled to put focus on the entire Music library, use the following script to close the frontmost playlist window and thereafter select the playlist it had contained in the main window:

tell application “iTunes”

try

set frontPlaylistWindow to front playlist window

set thePlaylist to view of frontPlaylistWindow

close frontPlaylistWindow

reveal thePlaylist

end try

end tell

Click on the little AppleScript icon above to open the script in Script Editor at your house—don’t copy the text in the browser.

Save the script as a Compiled “.scpt” with Script Editor named whatever you like in your [home]/Library/iTunes/Scripts/ folder so it can be launched from the iTunes Script menu. You may want to assign it a keyboard shortcut.

When run, it will get a reference to the front playlist window; if none is open, the script will fail silently. It will proceed to get a reference to the playlist contained by the playlist window, close the playlist window and finally select (reveal) the playlist.

March 23 '17 - 4:32 pm
iTunes 12.6.0.100

Apple has released another update to iTunes. The 12.6 release the other day was version 12.6.0.95. This new release is 12.6.0.100.

This has happened previously. Apple released iTunes 12.5.0.63 on August 2, 2016 and then released 12.5.0.68 a short time thereafter—I think it was certainly by August 12.

Sometimes you just don’t know how something is going to work until it’s tossed into the wild. And you have to appreciate Apple’s short turnaround.

March 22 '17 - 9:53 am
Playlist Windows

iTunes 12.6 has brought back Playlist windows and, judging from the reaction in my Twitter feed, they’re receiving a hearty welcome back. Couple of things, though: 1) The names of the open Playlist windows are not listed in the iTunes “Window” menu and 2) window names are blank for any Apple Music playlists opened as Playlist windows; they actually default to the name “iTunes” but this isn’t displayed either To be clear, the AppleScript name for the window of a subscription playlist is “iTunes” and not the name of the playlist. (Update: And now I’m not seeing this at all and all seems correct as far as names go; don’t know what I was seeing previously!)

I’m not so much concerned about the latter thing. But if you have a batch of Playlist windows open it can be an ordeal to select one you’d like to work in. This script will list all open Playlist windows in a choose from list panel so one can be chosen and then made frontmost:

tell application “iTunes”

if (count of playlist windows) < 2 then return

set windowList to playlist windows

set nameList to name of view of playlist windows

try

set chosenName to (choose from list nameList)

if chosenName is false then error

on error

return

end try

set chosenName to (chosenName as text)

repeat with i from 1 to (count of nameList)

if chosenName is item i of nameList then select item i of windowList

end repeat

end tell

Click on the little AppleScript icon above to open the script in Script Editor at your house—don’t copy the text in the browser.

Save the script as a compiled Script (“.scpt”) with Script Editor named whatever you like in your [home]/Library/iTunes/Scripts/ folder. When there are too many Playlist windows open and you can’t find any real estate to click on, launch the script to select the one you want brought to the front.

(Update: Of course, after I post this I immediately discovered that you can Command-tilde (~) through open Playlist windows.)

March 21 '17 - 6:13 pm
Tunes 12.6 Restores Playlist Windows

Playlist windows are back in iTunes 12.6. This is the feature in iTunes whereby an individual playlist can be opened in a separate window from the main iTunes browser window. There is a command in a playlist’s contextual menu to “Open in New Window”. It used to be you could double-click on a playlist to open it into a playlist window but this has not returned (Update, 3/22/2017: Command-double-click on the name of a Playlist in the Sidebar to open it in a Playlist window).

Playlist windows disappeared with iTunes 11 and at the time I suspected it had something to do with the way playlists were being re-designed for integration into iTunes Match/iCloud Music Library. I guess they figured it out.

The AppleScript property for playlist window has always been around but was ineffective once the actual UI element was removed. It still works. However, many of my scripts have been updated over the past few years to ignore playlist windows; perhaps there will be some opportunities to bring back this option. For the most part, scripts that require tracks to be selected will still only look for a selection in the browser window. One other thing: you can’t make a playlist window with AppleScript—something I’d always pined for—so you have to manually create the window. And, as Kirk points out, there’s no separate window for Store and For You and stuff of that ilk.

Still, nice to see playlist windows are back. Those of us who spend a lot of time tinkering with tracks really missed them.

March 21 '17 - 5:06 pm
iTunes 12.6 Released

Apple has released iTunes 12.6, which features the ability to watch rental movies across devices (using iOS 10.3 and tvOS 10.2). More as it develops.

Site contents © 2001 - 2017 (that's right: 2001) Doug Adams and weblished by Doug Adams. Contact support AT dougscripts DOT com. About.
All rights reserved. Legal.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc. This site has no direct affiliation with Apple, Inc.
One who says "it cannot be done" should not interrupt one doing it.