Following is a simple script I have been using for years with no problems. I would appreciate any suggestions about converting it to Python.
- Code: Select all
if value of variable "pennwoodDay" is "Sunday" then
set musicList to {"Sonos Play Tunein - WSHU-FM", "Sonos Play Tunein - KBAQ"}
set musicToday to some item of musicList
execute group musicToday
else
set musicList to {"Sonos Play XM - 50s on 5", "Sonos Play XM - 60s on 6", "Sonos Play XM - 70s on 7", "Sonos Play XM - The Blend", "Sonos Play XM - The Bridge", "Sonos Play XM - The Coffee House", "Sonos Play XM - The Loft"}
set musicToday to some item of musicList
log musicToday
execute group musicToday
end if