Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Cause iTunes to Speak, But at Track End' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Cause iTunes to Speak, But at Track End
Authored by: SeƱor Epiphyte on Dec 22, '08 04:20:10PM
tell application "System Events"
	if (name of processes) contains "iTunes" then
		-- First let's be sure the application is active, if not then we abort
		tell application "iTunes"
			
			if (player state is playing and name of current playlist is "Party Shuffle") then
				-- Don't insert this if we're not listening to the Party Shuffle, because that would be rude
				
				set currenttrack to the name of current track
				set currentartist to the artist of current track
				
				set tracklength to (duration of current track)
				
				if tracklength < 300 then
					-- long songs are typically news items or podcasts, so we'll skip them because they aren't fun
					-- for shorter songs then we will calculate position
					
					set waittime to (((tracklength) - (player position)) - 12)
					--back off a bit from the end to allow for crossfade and say

					delay waittime
					say "That was "
					say (currenttrack)
					say "by"
					say (currentartist)
					
				else
					-- if it is a long track, then lets say something radio station-ish or comment this out if not desireable
					say "Hope you are enjoying roddy rotten dot calm!"
					say "The time is currently"
					say time string of (current date)
					
				end if
				
			end if
		end tell
	end if
end tell


[ Reply to This | # ]
Cause iTunes to Speak, But at Track End
Authored by: BMurray on Oct 04, '11 04:42:42PM

I realize this is thread is a few years old now...

Anyway, I created a wonderful personal radio station script that I've been enjoying for the past few years. I recently upgraded the machine that it was running on from PPC to Intel.

And now I cannot seem to get the same results with Applescript say.

tell application "System Events"
if (name of processes) contains "iTunes" then
tell application "iTunes"
say "testes 1 2 3, wait, 3 testes?"
end tell
end if
end tell

This script does not have the same effect that it once did. I do not hear speech coming thru Nicecast when it's source is iTunes.

Nicecast v1.10.0
iTunes v10.4.1

I've tried several of the [Advanced] settings from the audio source dialog in Nicecast, no change.

Can anyone with a newer machine / setup reproduce this?

Thanks



[ Reply to This | # ]