Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iRock1

macrumors 65816
Original poster
Apr 23, 2011
1,081
144
Basically what I want to do is to add the text [Instrumental] to a lot of tracks at once, but when I select many tracks and press ⌘I, I don't get the lyrics field. So, for starters, doing this from iTunes by itself is impossible.

Then I went to Doug's Scripts and found only two scripts. One deletes the lyrics of all the selected tracks, while the other one copies the content from the clipboard to the currently selected or playing track, though it works only with one track at the time. So, again, no-go.

Now I'm out of ideas and a hand would be welcomed.
 

superscape

macrumors 6502a
Feb 12, 2008
937
223
East Riding of Yorkshire, UK
Hi,

If you look at the Doug's "Delete Lyrics" script (open it in AppleScript Editor), you'll see that it actually doesn't delete lyrics, it sets the lyrics to an empty string of text. So a minor tweak to Doug's script yields:

Code:
property myTitle : "Delete Lyrics"

set theText to text returned of (display dialog "Please enter the new lyrics" default answer "")
tell application "iTunes"
	set sel to selection
	if sel is not {} then
		repeat with this_track in sel
			try
				tell this_track to set lyrics to theText
			on error theError
				display dialog theError
			end try
		end repeat
	else
		display dialog "No tracks selected..." buttons {"Cancel"} default button 1 with icon 2 with title myTitle giving up after 15
	end if
end tell

NB. I haven't tested this thoroughly, use with caution!

Hope that's of some help!
 

iRock1

macrumors 65816
Original poster
Apr 23, 2011
1,081
144
Hi,

If you look at the Doug's "Delete Lyrics" script (open it in AppleScript Editor), you'll see that it actually doesn't delete lyrics, it sets the lyrics to an empty string of text. So a minor tweak to Doug's script yields:

Code:
property myTitle : "Delete Lyrics"

set theText to text returned of (display dialog "Please enter the new lyrics" default answer "")
tell application "iTunes"
	set sel to selection
	if sel is not {} then
		repeat with this_track in sel
			try
				tell this_track to set lyrics to theText
			on error theError
				display dialog theError
			end try
		end repeat
	else
		display dialog "No tracks selected..." buttons {"Cancel"} default button 1 with icon 2 with title myTitle giving up after 15
	end if
end tell

NB. I haven't tested this thoroughly, use with caution!

Hope that's of some help!

Excellent! I followed your advice and everything went great.

Thanks. ;)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.