Vous êtes sur la page 1sur 8

dougscripts.

com
Welcome!
Download hundreds (471 and counting) of AppleScripts for Apple's iTunes that will help
make managing your digital music collection easier and more fun!

Popular Now

downloaded 6m 20s ago download

Music Folder Files Find E


Not Added v5.9 Media
Displays files in iTunes Media folder Finds and
not in iTunes track library in the iTu

What's AppleScript?
AppleScript is a simple Macintosh-only programming language that can control and
automate actions on your Mac. AppleScript is already available on your computer as part of
the Mac OS and many popular applications can be automated using AppleScript scripts. Scripts
written for iTunes can manage files and track information, create playlists, interact with other
applications, perform innovative tasks, and handle many kinds of chores which otherwise
would be repetitive, laborious, and/or time-consuming.

Cool! Where Do I Start?


Start browsing the site by using the SCRIPTS Menu link above. AppleScripts are gathered
into these general Categories:

Or use the S E A R C H box at the top of


Managing Tracks every page to try and find something
Managing Track Info specific.
Managing Artwork
Managing Playlists Not sure how to install AppleScripts?
Controlling iTunes Here's a Download/Installation FAQ
Exporting Info & Video.

Check back often or follow me on Twitter


Managing Files @dougscripts or on Facebook, or
Networking subscribe to my RSS blog feed and 30
Internet Most Recent Scripts RSS feed to stay
iPod (iPhone/iPad) notified about new and updated scripts
Miscellaneous and info.
With Other Apps
Latest:
S e p t e m b e r 1 6 2 0 1 7 - 1 1 : 2 6 a m

Considerations When Updating to High Sierra


If you perform a clean install of the operating system, an iTunes folder will not be created in the
user Library folder nor the local Library folder (the one at the top level of the startup disk). This
has been the case since at least macOS 10.12.2.

Do not confuse this iTunes folder with the one created in Music, which stores iTunes support
files. The iTunes folder in the Library folder originally contained an iTunes Plug-Ins folder as
well as the Scripts folder. Apple no longer allows third-party visualizer plug-ins (I believe;
although the built-in visualizers still work), so the plug-ins folder is apparently unnecessary. But the
Scripts folder is still checked by iTunes for AppleScript files to display in its Script menu.

Thus, you may have to create these folders yourself. (But only after a clean install. If these folders
already exist and you simply update your OS or transfer from a backup post-install then the folders
will remain or be restored.) Below are listed the pertinent file paths, with the folders you may need
to create emphasized:

For all users of the machine: [startup disk]/Library/iTunes/Scripts/

For a single user: [startup disk]/Users/[user name]/Library/iTunes/Scripts/

(The user Library folder is hidden by default, but most nerds I know immediately make it visible:
Select your home folder and open it in a Finder window. Click View > Show View Options in the
Finder Menu or press Command-J. At the bottom of the View Options panel, check-mark the Show
Library Folder checkbox.)

Additionally, you can assign keyboard shortcuts to scripts that appear in the iTunes Script menu.

Dont forget that the system-wide Script menu, which appears on the right side of the Menu Bar,
can also be configured to display scripts that are associated with any frontmost application. Thus,
when iTunes is frontmost it can display the appropriate iTunes AppleScripts:

Folders for the system-wide Script menu must be set up like so:
For all users of the machine: [startup disk]/Library/Scripts/Applications/iTunes/

For a single user: [startup disk]/Users/[user name]/Library/Scripts/Applications/iTunes/

You can create AppleScripts for many other Apple and third-party applications and place them here
as long as the final folder name matches the name of the application (Photos, MarsEdit, Safari, and
so on).

Now, there are essentially two kinds of scripts, compiled scripts and application scripts. Compiled
scripts have this icon:

and application scripts (or applets) have this icon:

Compiled scripts can only be launched from the Script menu (or other third-party launcher). And
while applets can be conveniently launched from the Script menu, they can just as well be
launched from any location in the Finder by double-clicking them. Sometimes it may be easier to
launch an applet from an easy-to-access folder or from the Finders Toolbar rather than from one of
the Script menu locations.

posted in High Sierra, iTunes 12.7

S e p t e m b e r 1 3 2 0 1 7 - 8 : 1 6 a m

Drag From Audiobooks Fixed in iTunes 12.7


I may be the only person who cares about this, but iTunes 12.7 fixes a very long-standing bug
that prevented dragging tracks from the Audiobooks library to another app, say Join Together.
Thanks!

posted in iTunes 12.7

S e p t e m b e r 1 3 2 0 1 7 - 7 : 0 3 a m

Playlist Description in iTunes 12.7


I really like that you can add a description to playlists. In iTunes 12.7, now that Edit Playlist is
gone, its even less obvious how to do this than previously. In iTunes 12.7, make sure a playlist is
in Playlist View (rather than Songs View or Album View, and so on). Right-click anywhere in the
header of the playlist. In the contextual menu, select Add Description or Edit Description.
AppleScript has been able to access the description of a playlist since iTunes 12.4 and it doesnt
care what the current View is. Of course, the description only displays in Playlist View.

tell application "iTunes"


set thePlaylist to (get view of front browser window)
if thePlaylists special kind is not in {none} then return
add folder to list if/when it becomes possible

try
set currentText to (get thePlaylists description)
if currentText is missing value then set currentText to ""
on error
return
end try

try
set newDescription to text returned of
(display dialog "Enter description:" default answer currentText
with title (get thePlaylists name))
tell thePlaylist to set description to newDescription
on error
return
end try

end tell

Open this in Script Editor by clicking the little script icon. Save it named whatever you like as a
Script (.scpt) in your ~/Library/iTunes/Scripts/ folder so that it will be listed in the iTunes Script
menu. Its a great candidate for a keyboard shortcut.

Unfortunately, while you can manually edit the description for a Playlist Folder, AppleScript hasnt
caught up. Im hopeful this will be added to a future version.
posted in iTunes 12.7

S e p t e m b e r 1 2 2 0 1 7 - 8 : 3 4 p m

iTunes 12.7 Is Available


Apple has released a new version of iTunes that makes some significant changes. The new iTunes
focuses on music, movies, TV shows, podcasts, and audiobooks, says the support page. And as a
result, it no longer manages your iOS apps or Ringtones. iTunes U content has been moved to
Podcasts and Internet Radio can be made available in the Sidebar. There are also accommodations
for some new social features coming in iOS 11.

I suspect youll be hearing (or making) some complaints about the iOS apps and Ringtones
changes.

posted in iTunes 12.7

S e p t e m b e r 1 2 2 0 1 7 - 8 : 4 0 a m

TrackSift 2 Updated
Over the weekend, Apple approved and posted my update to TrackSIft 2. This latest version fixes
a problem some users were seeing with the Tracks Without Lyrics tool that prevented the tool
from recognizing accessible tracks. Ive gotten several reports from users that this is successfully
patched.

You can get more information about TrackSift 2 on this page and download it from the Mac App
Store.

posted in TrackSift

S e p t e m b e r 8 2 0 1 7 - 1 2 : 5 3 p m

iTunes U Moving to Podcasts


Apple has announced that iTunes U content will soon be moved to Podcasts. When that happens,
iTunes U content will only be available through the iOS Podcasts app or the Podcasts section of
iTunes. In iTunes, the iTunes U section will disappear.

What. You were expecting an iTunes U app?

posted in Podcasts

S e p t e m b e r 5 2 0 1 7 - 1 : 0 6 p m

Find Tracks with Multiple Artworks


This will corral all the tracks in the Music library that have more than one assigned artwork to a
new playlist (whose name you supply; any existing playlist(s) with that name will be deleted
beforehand):

tell application "iTunes"


try
set newPlaylistName to text returned of (display dialog
"Enter a name for the playlist:" default answer "Multi-artwork
tracks")
on error
return
end try

try
delete (every playlist whose name is newPlaylistName)
end try
set newPlaylist to (make new playlist with properties
{name:newPlaylistName})

set musicLibrary to (get some playlist whose special kind is Music)

repeat with i from 1 to (index of last track of musicLibrary)


try
set aTrack to track i of musicLibrary
if (count of artworks of aTrack) > 1 then
try
duplicate aTrack to newPlaylist
end try
end if
end try
end repeat

display dialog "Done" buttons {"OK"} default button 1

end tell

Open this in Script Editor by clicking the little script icon. Save it named whatever you like as a
Script Bundle in your ~/Library/iTunes/Scripts/ folder so that it will be listed in the iTunes Script
menu. Launch the script and enter a name for the playlist; the default is Multi-artwork tracks;
press OK.

posted in DIY, Managing Artwork

S e p t e m b e r 3 2 0 1 7 - 1 0 : 0 5 a m

Rolling Out Updates for High Sierra


Apple will be announcing new hardware and software at a September 12 Event. Most of the
attention, of course, is on the sparkly mobile-oriented stuff. Those of us anchored to iMacs and
Macbooks will hopefully hear a sentence or two about macOS 10.13 High Sierra which I reckon will
be released in late September (Sierra was released on September 20, 2016 after a September 7
Event).

Ive already started releasing updates to scripts and Ill be releasing more regularly over the
next few weeks. There are only minimal obligatory changes and accommodations to make. Most
current scripts should run OK in High Sierra. But there are some optimizations I can take
advantage of in macOS 10.13, thus the updates.

This is probably a good place to note once again that a clean install of macOS 10.12 and later
may not create a iTunes folder in the user Library directory. Scripts installed in
~/Library/iTunes/Scripts/ will appear in the iTunes Script menu; you may have to create the
intermediate folders yourself.

To stay apprised of updatesif you havent alreadysubscribe to me on Twitter, @dougscripts, or


on Facebook. Bookmark the 30 Most Recent page. Or subscribe to my Most Recent RSS feed
(if you still believe in RSS).
posted in High Sierra

A u g u s t 3 1 2 0 1 7 - 8 : 4 1 a m

Dropbox Dropping Support for Older OSs Soon


I just got an email from Dropbox letting me know that as of November 3, new installations of
Dropbox will be no longer be possible on macOS 10.6 (Snow Leopard), 10.7 (Lion) and 10.8
(Mountain Lion) and Windows Vista. Then, on January 17, 2018, support for these OSs will be
discontinued entirely. There is more here at Dropboxs site.

I know some iTunes users like to store their libraries in Dropbox (which I dont think is a great idea,
but there it is) so if youve got media files on an older machine using Dropbox you may want to
move that stuff out of there.

posted in Managing Files

A u g u s t 2 7 2 0 1 7 - 1 : 2 0 p m

UPDATED: Proper English Title Capitalization v3.6


Proper English Title Capitalization has been updated, primarily to provide compatibility with
High Sierra. But I also added a Dry Run Log window to pre-flight the changes before actually
affecting the tracks tags in iTunes.
Until now, I had logged this stuff to Console.app. Blech.

I also had a look at a problem with capitalizing words if they followed a colon (:). I think most
conditions are covered. Essentially, if a word follows a colon, its capitalized no matter what.

Proper English Title Capitalization is free to use with a donate nag and thanks for your support!
More information and download is on this page.

posted in High Sierra, Managing Track Info

2001 - 2017 (that's right: 2001) Doug Adams Contact support AT dougscripts DOT com. All rights reserved. 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.

Vous aimerez peut-être aussi