Page 1 of 1

iTunes via Applescript

PostPosted: Fri Sep 02, 2016 9:42 am
by makedrinklas
Hi,

I realize that I'm probably doing this way old-school, but I've noticed with recent upgrades (6.1.10) to Indigo, that our morning alarms are behaving intermittently. Here is the script, set to run on a schedule:

Code: Select all
tell application "Finder"
   set volume 4
end tell
tell application "iTunes"
   set sound volume to 20
   play user playlist "iTunes WAMU"
end tell

The bottom line is sometimes the audio is not playing and sometimes it is. We've been manually triggering the script via an action and then it works. (to an extent) It also seemed initially, after doing v6 upgrades/updates, that I needed to manually execute any schedule or actions that run these scripts to get them working again.

I was thinking it's possibly our lame Verizon DSL connection, but it had been very reliable until recent updates. But while slow, our internet has been reliable, we watch a lot of various streaming services (HBO Now, Netflix, Amazon Prime) in the evenings. Just trying to rule out issues.

I had set this up as a series of schedules to provide a gradual wake up alarm clock years ago and it's been great. See the screen cap for the list of schedules. I have an action group to turn each on or off depending on the wake-up time. There is probably a better way!

Re: iTunes via Applescript

PostPosted: Fri Sep 02, 2016 10:20 am
by jay (support)
On one of the days where it's not playing, check the Indigo log files to make sure that the schedules executed when they were supposed to. Each schedule execution should show up in the logs.

Also, make sure that your schedules don't have a condition that might be causing them to not execute their actions.

Re: iTunes via Applescript

PostPosted: Tue Sep 27, 2016 7:37 am
by Mirko
Hi,

I have two MacMini's:
#1 'miniserver' is running on 10.6.8 and is the Indigo server
#2 'mediaserver' is running 10.9.5 and is the iTunes server

When I enter my house the iTunes server on the #2 'mediaserver' starts to play my music triggered by the presence of my iPhone and using Indigo running on my #1 'miniserver'. This all works very well.
But I cannot choose on beforehand a specific song or artist or playlist in iTunes that I specifically want to hear when the Indigo trigger is triggered on my arrival.
The music starts to play the song or playlist that has been listened to before leaving the house. When I leave the house all music stops, triggered by Indigo.

How can I implement a trigger in Indigo running on my #1 'miniserver' that not only triggers iTunes on my #2 'mediaserver' but is able to trigger a specific playlist/song/artist as well??

In this way I can use it as a alarm clock as well.

It probably should be a script but I don't know how to write a script.

Is there a possibility to help me out here??

Thanks a lot!!

Mirko