Dieser Hint ist für jene unter uns, die keinen iPod nano oder Video besitzen, welche mit dem grossartigen Feature ausgestattet sind, iTunes Liedtexte automatisch zu synchronisieren und direkt auf dem iPod Display anzuzeigen. Ich habe [url=applescript://com.apple.scripteditor/?action=new&script=(*%20This%20script%20is%20an%20adaptation%20of%20Doug%20Adams”%20%22Lyrics%20to%20TextEdit%22%20for%20iTunes%20(http%3A%2F%2Fwww.dougscripts.com%2Fitunes%2F)%20and%20Apple”s%20own%20%22Clipboard%20to%20iPod%20Note%22%20script%20(http%3A%2F%2Fwww.apple.com%2Fapplescript%2Fipod%2F).%20%20I%20used%20both%20concepts%20and%20script%20lines%20from%20both,%20but%20the%20overall%20script%20is%20my%20own.%0A%09It%20does%20the%20following%3A%0A%09*Checks%20for%20a%20mounted%20iPod,%20and%20prompts%20for%20a%20selection%20if%20more%20than%20one%20iPods%20are%20found.%0A%09*Takes%20the%20lyrics%20(if%20any)%20for%20the%20currently%20playing%20track%20(if%20playing)%20or%20the%20currently%20selected%20track%5Bs%5D%20(if%20iTunes%20is%20not%20playing)%20and%20converts%20them%20to%20an%20iPod%20compatible%20note,%20complete%20with%20a%20%22Play%20Song%22%20hyperlink.%0A%09*If%20a%20mounted%20iPod%20is%20found,%20it%20will%20transfer%20the%20lyrics%20note%5Bs%5D%20to%20the%20iPod%20in%20a%20subfolder%20of%20the%20Notes%20folder%20called%20Lyrics%20(you%20must%20create%20this).%0A%09*Within%20the%20Lyrics%20folder,%20it%20will%20check%20for%20a%20folder%20named%20for%20the%20artist%20of%20each%20track--this%20is%20where%20the%20lyrics%20note%5Bs%5D%20will%20actually%20reside%20for%20each%20artist.%20%20If%20no%20artist%20folder%20is%20found%20for%20the%20track”s%20artist,%20it%20will%20create%20it.%0A%09No%20warranty%20is%20given%20or%20implied.%20%20Use%20at%20your%20own%20risk.%0A*)%0A%0Atell%20application%20%22iTunes%22%0A%09if%20player%20state%20is%20playing%20then%0A%09%09set%20sel%20to%20current%20track%20as%20list%0A%09else%20if%20selection%20is%20not%20%7B%7D%20then%0A%09%09set%20sel%20to%20selection%0A%09end%20if%0A%09%0A%09repeat%20with%20this_track%20in%20sel%0A%09%09set%20%7Bart,%20nom%7D%20to%20%7Bthis_track”s%20artist,%20this_track”s%20name%7D%0A%09%09set%20the_string1%20to%20%22%3Ca%20href%3D%5C%22ipod%3Amusic%3Fsong%3D%22%20%26%20nom%20%26%20%22%26artist%3D%22%20%26%20art%20%26%20%22%5C%22%3EPlay%20Song%3C%2Fa%3E%3Cbr%3E%22%0A%09%09set%20the_lyrics%20to%20this_track”s%20lyrics%0A%09%09set%20file_name%20to%20(art%20%26%20%22-%22%20%26%20nom)%0A%09%09%0A%09%09--%20check%20for%20iPods%0A%09%09set%20the%20mounted_iPods%20to%20my%20locate_iPods()%0A%09%09--%20check%20for%20iPod%20count%0A%09%09if%20the%20mounted_iPods%20is%20%7B%7D%20then%0A%09%09%09error%20%22No%20iPod%20is%20connected%20to%20this%20computer.%22%0A%09%09else%20if%20the%20(count%20of%20the%20mounted_iPods)%20is%20greater%20than%201%20then%0A%09%09%09--%20choose%20iPod%0A%09%09%09set%20the%20ipod_names%20to%20%7B%7D%0A%09%09%09repeat%20with%20i%20from%201%20to%20the%20count%20of%20the%20mounted_iPods%0A%09%09%09%09set%20this_iPod%20to%20item%20i%20of%20the%20mounted_iPods%0A%09%09%09%09tell%20application%20%22Finder%22%0A%09%09%09%09%09set%20the%20end%20of%20the%20ipod_names%20to%20the%20name%20of%20this_iPod%0A%09%09%09%09end%20tell%0A%09%09%09end%20repeat%0A%09%09%09set%20this_name%20to%20(choose%20from%20list%20ipod_names%20with%20prompt%20%22Pick%20the%20iPod%20to%20use%3A%22)%20as%20string%0A%09%09%09if%20this_name%20is%20%22false%22%20then%20error%20number%20-128%0A%09%09%09repeat%20with%20i%20from%201%20to%20the%20count%20of%20the%20ipod_names%0A%09%09%09%09if%20item%20i%20of%20the%20ipod_names%20is%20this_name%20then%0A%09%09%09%09%09set%20this_iPod%20to%20item%20i%20of%20the%20mounted_iPods%0A%09%09%09%09%09exit%20repeat%0A%09%09%09%09end%20if%0A%09%09%09end%20repeat%0A%09%09else%0A%09%09%09set%20this_iPod%20to%20item%201%20of%20the%20mounted_iPods%0A%09%09end%20if%0A%09%09%0A%09%09set%20artist_folder%20to%20art%20as%20string%0A%09%09set%20l_folder%20to%20this_iPod%20%26%20%22Notes%3A%22%20%26%20%22Lyrics%3A%22%20as%20Unicode%20text%0A%09%09tell%20application%20%22Finder%22%0A%09%09%09if%20not%20(folder%20(l_folder%20%26%20artist_folder)%20exists)%20then%0A%09%09%09%09make%20new%20folder%20at%20l_folder%20with%20properties%20%7Bname%3Aartist_folder%7D%0A%09%09%09end%20if%0A%09%09%09set%20the%20the_path%20to%20folder%20(l_folder%20%26%20artist_folder)%0A%09%09end%20tell%0A%09%09%0A%09%09%0A%09%09if%20the_lyrics%20is%20not%20%22%22%20then%0A%09%09%09set%20this_data%20to%20%7Bthe_string1%20%26%20nom%20%26%20the_lyrics%7D%20as%20string%0A%09%09%09set%20target_file%20to%20(the_path%20as%20string)%20%26%20file_name%0A%09%09%09set%20openTargetFile%20to%20open%20for%20access%20file%20target_file%20with%20write%20permission%0A%09%09%09write%20this_data%20to%20openTargetFile%0A%09%09%09close%20access%20openTargetFile%0A%09%09%09--%09end%20tell%0A%09%09else%0A%09%09%09beep%0A%09%09end%20if%0A%09end%20repeat%0Aend%20tell%0A%0Aon%20locate_iPods()%0A%09set%20the%20volumes_directory%20to%20%22%2FVolumes%2F%22%20as%20POSIX%20file%20as%20alias%0A%09set%20the%20volume_names%20to%20list%20folder%20volumes_directory%20without%20invisibles%0A%09set%20mounted_iPods%20to%20%7B%7D%0A%09repeat%20with%20i%20from%201%20to%20the%20count%20of%20volume_names%0A%09%09try%0A%09%09%09set%20this_name%20to%20item%20i%20of%20volume_names%0A%09%09%09set%20this_disk%20to%20(%22%2FVolumes%2F%22%20%26%20this_name%20%26%20%22%2F%22)%20as%20POSIX%20file%20as%20alias%0A%09%09%09set%20these_items%20to%20list%20folder%20this_disk%0A%09%09%09if%20%22iPod_Control%22%20is%20in%20these_items%20then%0A%09%09%09%09set%20the%20end%20of%20the%20mounted_iPods%20to%20this_disk%0A%09%09%09end%20if%0A%09%09end%20try%0A%09end%20repeat%0A%09return%20mounted_iPods%0Aend%20locate_iPods]ein Skript[/url] erzeugt, das alle bestehenden Liedtexte in iTunes 5 (oder 6) als Notiz auf einen iPod transferiert, komplett mit einem «Play Song» Link.
Dieses Skript ist eine Adaption von Doug Adams [URL=http://www.dougscripts.com/itunes/scripts/scripts03.php?page=1#lyricstotextedit]Lyrics to TextEdit[/URL] Skript für iTunes und Apples eigenem [URL=http://www.apple.com/applescript/ipod/]Clipboard to iPod Note[/URL] Skript. Ich habe sowohl Konzept als auch Skriptzeilen von beiden verwendet, aber das Gesamtskript ist von mir selber. Es macht folgendes:
[LIST]
© by macjaner.ch | Powered by GoeGG-ArT.ch