Was wondering if this is possible to do in AppleScript (happy if easier in Python?)
I want to have Indigo announce entry to my front door via Sonos. I have the trigger for door entry and know how to put a variable into Sonos, but cannot work out how the script it. Basically I was thinking along the lines of an array? whereby the array would contain strings of words that could be announced...
e.g. array = "Hello There,
Welcome Home
Hi there how was your day
Door open"
The script would generate a random number between 1 and 4, and have this number pick one of the four array responses, this would then be announced by Sonos
So far I have this as my random number generator, but have seen an error whereby the Indigo Variable is read-only
property SonosAnnounce : 1
tell application "IndigoServer"
set value of variable SonosAnnounce to (random number from 1 to 4)
end tell
Any ideas?
Vangelis