PDA

View Full Version : Appleevent timed out


boohickey11
08-04-2005, 11:02 PM
Hi all,
I'm still working on my podcast alerting script and I am still in the process of adding and debugging it. I get the appleevent timed out error if i don't answer the script within about a minute and i was wondering if you could give me info on how to either have it ignore the error, or how to get around it.
Heres the current script:

--PodInformerBeta


on idle
tell application "iTunes"

set voice to some item of {"Agnes", "Albert", "Bad News", "Bahh", "Bells", "Boing", "Bruce", "Bubbles", "Cellos", "Deranged", "Fred", "Hysterical", "Junior", "Kathy", "Princess", "Ralph", "Trinoids", "Victoria", "Whisper", "Zarvox"}
set current_tracks to (played count of tracks in playlist "podcasts" as list)

if player state is playing then
set flag to false
else
set flag to true
end if

if flag is true then set volume 2
if current_tracks contains 0 and flag is true then say "You've got podcasts!" using voice
set volume 4
if current_tracks contains 0 and flag is true then display dialog "You have a new podcast!" default button "OK"

return (60)
end tell
end idle

--Thank you

deeg
08-05-2005, 07:47 AM
hi,

if you look in the standard additions dictionary, under "user interaction" you'll find the display dialog command...

it has a parameter "giving up after <integer>" . this is the amount of time it waits for you to
reply to the dialog before it dismisses it without error. If you need to trap if the dialog is self-dismissed then the returned results will include "gave up:true".

hth

deeg

boohickey11
08-06-2005, 04:43 PM
Thanks,
thats what it needed.