Reading iCal Events out loud

I made a nifty Automator script that when I run it will speak my daily iCal events. Works Great when I run it within Automator, but when I try to save it as an application; it ceases to speak the events. Upon closer inspection it seems to be an applescript error 1728; seems it can’t load the voice list… Anyone have any idea why it won’t run; or if there is something out on the web that will simply read your days events out loud at a specified time?

thx

Hi newmac,
It would help to see the applescript part, and to know what other Actions and options you are using

It is a simple sequence; with the problem occuring at the end; for the speaktext part. When I make the workflow visible it has a problem loading the voices.

2008-03-31 13:51:07 -0400: Find Events in iCal completed (This gets Home calendar events that start today)
2008-03-31 13:51:08 -0400: Find Events in iCal completed(This gets Work calendar events that start today)
2008-03-31 13:51:11 -0400: Find Events in iCal completed
2008-03-31 13:51:12 -0400: Find Events in iCal completed
2008-03-31 13:51:13 -0400: Event Summary completed (This list events)
2008-03-31 13:51:13 -0400: Filter Paragraphs completed This filters out dates; so items that begin with Summary; are read)
2008-03-31 13:51:18 -0400: Speak Text completed (This speaks fine when running in automator; but not when saved as an application)
2008-03-31 13:51:18 -0400: Workflow completed

The applescript error is
"cant get <> “loading” of missing value
(-1728)

thanks

I not sure how I am being thick here, But you log is no help to me??

Please post the Applescript Part.

And it would help to know the exact Actions and setting for each action

This is so I can try and replicate your issue, and then try and find a fix.

Its an Automator script; if thats actually an applescript I can’t figure how to extract the applescript (tried dropping on script editor) all I have is the log data

(novice)

Ok , I do not think you are using Applescript

I have tried to duplicate your Actions.

for the Speak part , I used Apple Script, also tried Speak text, and a say command in a Run shell Script action.
They all work in Automator.
but Not in a App.

I am on 10.5.2
I do not get any errors, Just no sound.

A quick test, to see if the app is actually getting anything to say:
is to use a ‘Run Shell Script’ in place of a ‘Speak text’

with settings:
Pass Input = argument
text area: /usr/bin/say 1,$1

My results when run as an app, I get the 1 said but nothing else.
this tells me that the app is not being passed the summaries . Which shouts bug.
I also tested with some applescript and got the same results.

Ok figured a way of getting it to work. 3 actions.

Find Events in iCal - Action
Find: events
Whose :
Calendar is Home

  • start date is today
    Find Events in iCal - Action
    Find: events
    Whose :
    Calendar is work
  • start date is today

Run Applescript Action

on run {input, parameters}
	
	using terms from application "iCal"
		repeat with i from 1 to number of items of input
			set this_item to item i of input
			set t to summary of this_item
			say "Todays event " & i & "  of  " & (number of items of input) & "." & space & t
		end repeat
	end using terms from
	
end run

iCal will launch if not open already, but will stay in background…

Oh excellent; thanks; I’ll play with that later today. So its a 10.5.2 bug… well 10.5.3 is on the way…

Yes; the script works when saved as an application. However I had previously done some filtering to get it to read a certain way; I took those actions out; so I get something like:

"Good morning; your schedule today is 1 of 2; Call Julie;

Good morning; your schedule today is 2 of 2; Pick up some eggs at the store"


So its working; but how can I modify the applescript to get it to say something like:

"Good morning. Your schedule today is as follows. 2:00; Call Jule. 3:00; pick up some eggs at the store. Have a nice day…

thx in advance.:wink:

Hi,

I ran the automator actions with my calendars and put in the applescript but the voice is not saying events that repeat. I have an event that repeats weekly and it is not saying it. Can anyone tell me what I’m doing wrong?

Other than this, great script!

Thanks
Frank

Model: MacBook 2.1 GHz
AppleScript: Applescript Utility 1.1, Script Editor 2.2
Browser: Safari 525.20.1
Operating System: Mac OS X (10.5)

hey guys!

i was searching very long for this topic…
i want that a applescript reads out my today’s events of iCal for all calendars. Is that possible?

I was trying very hard but without any success… does anyone know the script?

thx!

I’ve done it-- I have a script that reads my iCal appointments out loud to me every morning. It also gives me a weather report. It also says “Good morning.”

I trigger it using Script Timer. You could do it with an iCal appointment that triggers the script but I don’t like cluttering up the calendar with that sort of thing.

Use this link:

http://christianboyce.blogspot.com/2009/09/your-appointments-sir_4544.html

Good luck to you!

UPDATE: I figured out a faster way to get the calendars. All one has to do is this:

set the_calendars to every calendar whose name contains “football” or name is “NFL PrimeTime 2011” or name is “CB & A”

This gets the list of calendars without that silly looping that I’d been doing before. So…

Replace this:
set the_calendars to {}
set every_calendar to every calendar
– Now we have a list of calendars to check.
repeat with an_item in the_calendar_list
set end of the_calendars to (first calendar whose name is an_item)
end repeat

with this:
set the_calendars to every calendar whose name contains “football” or name is “NFL PrimeTime 2011” or name is “CB & A”

and away you go. Of course you would modify the above to choose the calendars you like. Notice my use of “contains” for the calendars that have “football” in their names. That’s because I have a calendar called “UCLA football schedule” and another called “Texas football schedule” and so on. This way, I get all of those without explicitly specifying them in the script.

Model: iMac Intel, Core Duo
AppleScript: 2.1.2
Browser: Safari 534.50
Operating System: Mac OS X (10.6)