dougscripts.com

October 18 2013 - 8:59 am

UPDATED: Search-Replace Tag Text v3.5

Search-Replace Tag Text v3.5 performs a search-and-replace on the text in your choice of tag (Song Name, Show, Artist, Album Artist, Album, Composer, Comments, Genre, or Grouping) in the selected tracks or all the tracks in the selected Playlist. Features case sensitivity and whole word match options and dry run preview.

This new version stores the dry run setting between launches, has some additional minor tweaks and is ready for Mavericks.

More information and download is here.

October 17 2013 - 7:07 pm

AirPlay Scripting Workaround

As previously noted, you can't do this without getting -1728 errors:

tell application "iTunes"

set apDevices to (get AirPlay devices)

end tell

But you can do this:

tell application "iTunes"

set apDevices to (get a reference to AirPlay devices)

-- see?

log (get name of apDevices)

-- or

repeat with aDevice in apDevices

log (get aDevice's name)

end repeat

-- or

repeat with aDevice in AirPlay devices

log (get aDevice's name)

end repeat

end tell

That's if you need to do that.

October 17 2013 - 7:27 am

UPDATED: Track Down Purchases v2.2

Track Down Purchases v2.2 will examine each track in the entire iTunes library—or a selection of tracks—for items purchased from the iTunes Store (audio, video, and books) and then sort them by either the purchaser's name or account ID into discrete playlists, eg: "Purchased by Tom Ryan" or "Purchased by tomryan@email.com".

This latest version changes the name of each playlist created (prefixing it with "Purchased by") so that they'll sort together and also fixes an issue with misreading account ID data that produced garbled text in the playlist names.

More info and download here.

October 3 2013 - 8:16 pm

iTunes 11.1.1 Available

Apple has released iTunes 11.1.1 with bug fixes for podcast management and iTunes Extras display and a helping of stability fixes. Looks like you can once again delete old podcast episodes.

The AirPlay bug mentioned below has not been fixed.

September 23 2013 - 12:12 pm

iTunes 11.1 Breaks Some Airplay scripting

[UPDATE: iTunes 11.1.2 addresses and fixes this issue.]

The latest version of iTunes breaks some scripts I posted when Airplay scripting was introduced back in the Spring.

Specifically, an error will be generated doing something as simple as this:

tell application "iTunes"

set apDevices to (get AirPlay devices)

end tell

Come on. It's gotta be a bug, right? You can still get properties of AirPlay devices and set the current AirPlay devices property by device name:

tell application "iTunes"

set apDevices to (get name of AirPlay devices)

--> {"Computer", "Doug's AirPort Express"}

set current AirPlay devices to AirPlay device "Computer"

end tell

Waiting to see how this evolves.

September 21 2013 - 10:20 am

NEW: Multi-Media Items Edit

For reasons not yet clear, as of iTunes 11.1, multi-item editing is no longer possible when a track selection contains mixed media kinds, audio and PDF for example. Kirk explains the matter here.

The script Multi-Media Items Edit provides basic tag editing for a selection of tracks of any media kind.

Wondering why your favorite tag or option isn't included? Just keeping it simple, friend-o.

September 18 2013 - 1:01 pm

iTunes 11.1 with iTunes Radio Available

Apple has made iTunes 11.1 available to download today just ahead of the iOS 7 release. iTunes 11.1 sports iTunes Radio, which you may or may not think is the greatest thing since MP3s (I'm not exactly thrilled with it, but I think most people will like it).

iTunes Radio is 'scriptable to a degree and I'll have more on that later.

September 2 2013 - 4:33 pm

Dupin v2.7.2/Dupin Lite v1.3 Now Available

I was so busy over the weekend fighting bugs in the latest release of Dupin that I neglected to post that there actually are new versions available (here in the US it was Labor Day weekend, the irony of which is not lost on me).

I'm pleased to announce that Dupin and Dupin Lite have been updated with some new features, some minor fixes and enhancements, and are ready for OS X 10.9 Mavericks.

Dupin is your iTunes duplicates manager.

As Macworld recently wrote, both Dupin and Dupin Lite "do a much better job than iTunes' Show Duplicate Items command of finding and zapping duplicate files, letting you easily tame overflowing libraries." Dupin has a few more power features, such as Re-Playlisting and Consolidate History. Dupin Lite has the same Get Dupes-Filter-Purge tools without the power-user features and is available at the Mac App Store.

Both now incorporate QuickLook auditioning (added in Dupin v2.6) and support Notifications. New to both is "dead" track detection, which will enable you to ignore or delete detected "dead" track duplicates.

You can download the latest version of Dupin here, or click "Check for Update" in your current version.

Dupin Lite is on the Mac App Store, or you can update through the App Store.app from the "Updates" panel.

(more…)

August 17 2013 - 6:28 am

iTunes 11.0.5 Released

Apple has updated iTunes to correct some issues with tracks stored in the cloud. You can get iTunes 11.0.5 from the App Store app's "Updates" tab or directly from Apple's website.

August 16 2013 - 9:34 am

Toggle Stereo/Mono Audio Output

Correspondent Simon Crosbie has set up an amp and pair of speakers in his workshop which is connected to an Airport Express. Unfortunately, the speakers are some distance apart, so that he may be near one speaker or another at any time, and will only hear that channel's output. Simon wanted to know if there's a way to toggle between stereo and mono output so he can hear more than just half of a stereo recording.

Yes, there is a way. Go to System Preferences > Accessibility. Choose "Audio" in the left-hand list and in the panel that appears click the checkbox next to "Play stereo audio as mono".

Goodnight everybody!

Wait a minute. I almost forgot I wrote this script to do it:

tell application "System Preferences"

reveal anchor "Hearing" of pane id "com.apple.preference.universalaccess"

end tell

tell application "System Events"

tell application process "System Preferences"

set frontmost to true

tell window "Accessibility"

##--> pre 10.9 set monoStereoCheckbox to checkbox 2 of group 1

set monoStereoCheckbox to checkbox "Play stereo audio as mono"

if (get value of monoStereoCheckbox) as boolean is true then

set ddMessage to "Switch to STEREO output?"

else

set ddMessage to "Switch to MONO output?"

end if

if button returned of (display dialog ddMessage buttons {"No", "Yes"} default button 2) is "Yes" then

tell monoStereoCheckbox to click

end if

end tell

end tell

end tell

if application "System Preferences" is running then

tell application "System Preferences" to quit

end if

[UPDATE November 13, 2013: The original script has been updated for Mavericks. Note the commented line for pre-10.9 systems and the line that follows it. Set the monoStereoCheckbox variable using one or the other depending on the OS.]

[UPDATE October 17, 2014: Another change for compatibility with Yosemite. The line "set frontmost to true" is inserted right after the first tell application process "System Preferences" line near the beginning.]

I would save this script in the system wide Scripts menu (install it in ~/Library/Scripts/). Because the script uses (gulp) GUI scripting you must make sure that "Enable access for assitive devices" is checked in the Accessibility System Preferences panel.

Smarties among you can figure out how to switch mono/stereo when using AppleScript to change AirPlay speakers.

And bear in mind that while the script works with the current OS (and probably an OS that may be released this Fall), Apple may change the layout of the System Preferences panels in a future update, in which case the GUI scripting will have to be updated.

[UPDATE December 28, 2018: Mojave made some changes and the updated version of the script can be seen here.

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