Create new playlist and be asked to add it to iPod?

GO TO ADMIN PANEL > ADD-ONS AND INSTALL VERTIFORO SIDEBAR TO SEE FORUMS AND SIDEBAR

MikeM

New member
Administrator
Joined
May 7, 2003
Messages
4,655
Points
0
Age
42
Location
ME, USA
I searched the 'Doug's Applescripts' site and didn't find this.

I use iTunes and do all of my synching at work. I do all of my iPod listening away from work. I often make new playlists, synch the iPod, get in my car, and find that I forgot to add the playlist to the iPod. [I use auto-sync but choose only specific lists for the iPod]

So, I'm curious if a script can be written so that when I make a new playlist I get a pop-up of some sort asking yes or no if I want to add this playlist to the iPod. If I choose yes, it would then add the playlist to the iPod.

I'm going to attempt to do this myself but if someone could write this quickly, I would appreciate it very much!
 
Joined
Jul 1, 2003
Messages
705
Points
0
Location
Providence, RI, USA
Website
dougscripts.com
AppleScript doesn't like auto-synching with the iPod since very often the synching over-rules what the script wants to do.

What you are suggesting would require a script continually running in the background that detected when new playlists were created.

Here's what I do: I "Manually manage" and use a script called New iPod Playlist From Selection. I just select a bunch of tracks in the iTunes Library, run the script, and it copies them to a new playlist on the iPod.

I wish you could incorporate some code in a script that disabled auto-synching on the fly (iTunes is more or less GUI-scripting-proof), but, of course, when auto-synching came back online, most probably the work would be undone!
 

MikeM

New member
Administrator
Joined
May 7, 2003
Messages
4,655
Points
0
Age
42
Location
ME, USA
I realized quickly that it wouldn't work in auto-sync mode. I tried to figure out if I could get it to go to manual, perform the operation, and then go back, but like you said, that doesn't seem to be possible.

I also couldn't figure out how to get a script to run in the background but that was me using applescript for the first time and not really knowing what I was doing.

I did get the pop-up message to appear and if "Yes" was chosen, it would copy the playlist [in manual mode, of course]. I guess I'll have to call that a fair attempt and let it go. Without an auto-sync 'override' my idea won't work. I don't want to change to manual just for this.

Thanks for the reply. And for your site- I never would have completed what scripting I had without it!
 

MikeM

New member
Administrator
Joined
May 7, 2003
Messages
4,655
Points
0
Age
42
Location
ME, USA
Excellent. Thanks! I'll give that go.

I figure if I can at least pop open a reminder to put the new playlist on the iPod, I'll be better off than I was.
 

MikeM

New member
Administrator
Joined
May 7, 2003
Messages
4,655
Points
0
Age
42
Location
ME, USA
Okay, I've got it working!

The script does run continuously now!

It first sets a variable to the current playlist count.

It then repeatedly checks to see if the variable + 1 is equal to the playlist count. If so, it pops up the message reminding me to put the playlist on the iPod.

I also added a check to see if I removed a playlist, so that the script doesn't break if I remove a playlist.

I now get a reminder to put a new playlist on the iPod.

One question- is there a way to switch the view to the iPod in the source column? I could figure out how to switch to another playlist but not the iPod.

Thanks a lot for your help and your web site. That page you linked to was huge a help and I pulled from several other scripts to get this done.

If there's ever a way to script a switch from auto-sync to manual and back again, please let me know! :)
 
Joined
Jul 1, 2003
Messages
705
Points
0
Location
Providence, RI, USA
Website
dougscripts.com
Mike,

My iPod's name is iPod. Just substitute your iPod's name:
Code:
tell application "iTunes"
	set view of front window to library playlist 1 of source "iPod"
end tell
This is not intuitive because the iTunes library as a source is always understood and doesn't have to be declared. Any other source must be in the reference.
 

MikeM

New member
Administrator
Joined
May 7, 2003
Messages
4,655
Points
0
Age
42
Location
ME, USA
I swear I tried that. I must have typed something wrong before. Oh well. Its works now! Thanks!
 
Top