ok, in my iTunes controller I have a menu item (Set Genre) and then a list of all the genres as the sub-menu items. It took a really long time to do that, and I was wondering if, I can make my code really short instead of typing code for every freakin genre. Possible? I hope so…
property : genreList : {"Rock", "Pop", "Hip-Hop/Rap", "Classical"}
set genrePopup to popup button "genre" of window "main"
repeat with thisGenre in genreList
-- The property 'name' below is the AppleScript name which you can use reference like:
-- 'menu item "Jazz" of menu of genrePopup'
tell menu of genrePopup to make new menu item at end of menu items with properties ¬
{title:thisGenre, name:thisGenre}
end repeat
I don’t know how to actually create a list of genres from iTunes.