[macvoiceover] Fwd: Adding radio streams to a playlist

Here is an explination of how to do this from Esther. She is not on this list , but she was kind enough to send this to me.

Keith



Begin forwarded message:

From: Esther <moriond@xxxxxxx>
Date: April 16, 2007 3:01:52 PM EDT
To: "John W. Hess" <johnythehess@xxxxxxxxxxx>
Cc: Keith Reedy <WA9DRO@xxxxxxxxx>
Subject: Adding radio streams to a playlist

HI,

Adding radio streams to a playlist was discussed on the Macvisionaries
discuss list last month.  Here's Lou's post:

http://macvisionaries.com/pipermail/discuss_macvisionaries.com/2007- March/019982.html

You can always create a playlist from selected items, including streams. The tricky part is adding to a playlist when there is no contextual menu
for adding to playlists for radio streams.

I actually use an AppleScript to add radio streams to a new or existing playlist. Again, discussions about the "Missing Menu Command" and other AppleScripts for iTunes were on the discuss list. I'll copy a sample script at the end of this message. Open the script editor under applications, paste the code in, and then "compile". Select your radio streams (or music tracks, etc.) and then "run" the script. You'll be prompted with the names of current playlists. Select
a playlist, and the streams (or tracks) will be added.

This sounds like a lot more work than it actually is, because in general you only need to download the AppleScripts for iTunes and save them to the Library/iTunes/Scripts/ directory of your user account. They automatically
show up as additional menu items on your menu bar (VO-keys +m to get
to menu bar, then right arrow to the scripts menu; it's just after "window" and
before "help"). Down arrow to select the script you want to run.

In the current case, you'll have to save the compiled AppleScript (and you may have to create a Scripts folder -- e.g. /Users/johnny/Library/ iTunes/Scripts -- if this is the first time you're using AppleScripts). Choose a descriptive
name like "Selected Tracks to Selected Playlist".

AppleScripts for iTunes, how to find them, and how you can bind them to
shortcut keys are discussed in more detail in a couple of threads.

This describes compiling, running, and saving a "Jump to Playlist" script,
and how to bind it to a keyboard shortcut:

http://www.mail-archive.com/discuss@xxxxxxxxxxxxxxxxxx/msg13057.html

This describes other AppleScripts, including "Reset Bookmarks" and
gives suggestions on how to navigate the AppleScripts for iTunes page.
(I assume you will look at the Missing Menu Pages with grouping on,
so the code examples will appear in blocks):

http://www.mail-archive.com/discuss@xxxxxxxxxxxxxxxxxx/msg13429.html

The last two links are from the Mail Archives -- the main discuss archives
stopped working during the end of March.  Hope this helps. I'm not
subscribed to the Free List mailing list, so I'm sending this to your last
email addresses from the discuss lists.

Here's the AppleScript called "Selected Tracks to Selected Playlist":

tell application "iTunes"
        if selection is not {} then
                set sel to selection
                
-- comment out one or the other by placing "--" in front of the line:
                
                -- use for pre-iTunes 4.9
set the_playlist to ((choose from list (get name of every user playlist whose smart is false and ¬ name is not "Party Shuffle" and name is not "Purchased Music") with prompt ¬ "Copy selected tracks to..." OK button name "This Playlist" without multiple selections allowed) as string)
                
                -- use for iTunes 4.9 and later
set the_playlist to ((choose from list (get name of every user playlist whose smart is false and ¬
                        special kind is none) with prompt ¬
"Copy selected tracks to..." OK button name "This Playlist" without multiple selections allowed) as string)
                
                if the_playlist is "false" then
                        return
                else
                        set the_playlist to playlist the_playlist
                end if
                
                with timeout of 30000 seconds
                        repeat with this_track in sel
                                try
if not (exists (some track of the_playlist whose database ID is (get this_track's database ID))) then ¬
                                                duplicate this_track to 
the_playlist
                                end try
                        end repeat
                end timeout
                
                try
if button returned of (display dialog "Done" buttons {"Select " & (name of the_playlist), "Thanks"} default button 2 ¬ giving up after 15) starts with "sel" then set view of front browser window to the_playlist
                end try
        else
display dialog "No tracks selected..." buttons {"Cancel"} default button 1 with icon 2 giving up after 15
        end if
end tell


Hope this helps.

Cheers,

Esther



Click on the link below to go to our homepage.
http://www.icanworkthisthing.com

Manage your subscription by using the web interface on the link below.
http://www.freelists.org/list/macvoiceover

Users can subscribe to this list by sending email to
 macvoiceover-request@xxxxxxxxxxxxx
with 'subscribe' in the Subject field OR by logging into the Web
interface at http://www.freelists.org/list/macvoiceover

Other related posts: