Wednesday, November 26, 2014

#1 2008-03-31 10:20:14 am

newmac
Member
Registered: 2008-03-31
Posts: 4

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

Offline

 

#2 2008-03-31 12:25:15 pm

mark hunte
Member
From: Hello, London Calling
Registered: 2006-03-20
Posts: 1024
Website

Re: Reading iCal Events out loud

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

Last edited by mark hunte (2008-03-31 12:25:41 pm)


Tap,tap,tap , hello , testing 1..2,  1...2,
http://www.markosx.com/thecocoaquest/

Offline

 

#3 2008-03-31 12:53:17 pm

newmac
Member
Registered: 2008-03-31
Posts: 4

Re: Reading iCal Events out loud

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 <<class prol>> "loading" of missing value
(-1728)

thanks

Last edited by newmac (2008-03-31 12:57:58 pm)

Offline

 

#4 2008-03-31 01:01:40 pm

mark hunte
Member
From: Hello, London Calling
Registered: 2006-03-20
Posts: 1024
Website

Re: Reading iCal Events out loud

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.

Last edited by mark hunte (2008-03-31 01:07:20 pm)


Tap,tap,tap , hello , testing 1..2,  1...2,
http://www.markosx.com/thecocoaquest/

Offline

 

#5 2008-03-31 04:09:51 pm

newmac
Member
Registered: 2008-03-31
Posts: 4

Re: Reading iCal Events out loud

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)

Offline

 

#6 2008-04-01 11:42:12 am

mark hunte
Member
From: Hello, London Calling
Registered: 2006-03-20
Posts: 1024
Website

Re: Reading iCal Events out loud

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.


Tap,tap,tap , hello , testing 1..2,  1...2,
http://www.markosx.com/thecocoaquest/

Offline

 

#7 2008-04-01 06:54:47 pm

mark hunte
Member
From: Hello, London Calling
Registered: 2006-03-20
Posts: 1024
Website

Re: Reading iCal Events out loud

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

Applescript:

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..


Tap,tap,tap , hello , testing 1..2,  1...2,
http://www.markosx.com/thecocoaquest/

Offline

 

#8 2008-04-02 08:20:35 am

newmac
Member
Registered: 2008-03-31
Posts: 4

Re: Reading iCal Events out loud

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.;-)

Last edited by newmac (2008-04-02 12:39:20 pm)

Offline

 

#9 2009-01-03 06:17:00 pm

frankfink
Member
Registered: 2008-12-13
Posts: 3

Re: Reading iCal Events out loud

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)

Offline

 

#10 2010-08-14 09:21:45 am

weblexx
Member
Registered: 2010-08-13
Posts: 1

Re: Reading iCal Events out loud

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!

Offline

 

#11 2011-03-27 09:45:55 am

christianboyce
Member
Registered: 2011-03-17
Posts: 2

Re: Reading iCal Events out loud

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 … _4544.html

Good luck to you!

Offline

 

#12 2011-09-18 01:59:56 pm

christianboyce
Member
Registered: 2011-03-17
Posts: 2

Re: Reading iCal Events out loud

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)

Offline

 

Board footer

Powered by FluxBB

[ Generated in 0.053 seconds, 10 queries executed ]

RSS (new topics) RSS (active topics)