iCal scripting problem
iCal scripting problem
- Subject: iCal scripting problem
- From: Christian Boyce <email@hidden>
- Date: Fri, 1 Oct 2004 19:08:09 -0700
If I have a script that involves iCal, AND I make an iCal event whose
alarm triggers that script, AND if iCal is not running when the alarm
time comes, the script runs twice.
If the script does not involve iCal it will only run once, whether iCal
is running at the alarm time or not.
If iCal is already running at the alarm time the script will only run
once, whether the script involves iCal or not.
The script works perfectly from the Script Editor whether iCal is
running or not.
Here's an example script that runs once , whether iCal is running or
not at the alarm time. (My real script is a bit more useful but the
simple ones shown below illustrate the problem.)
tell application "Finder"
activate
display dialog "yo"
end tell
--(perfect)
if I change "Finder" to "iCal" the script runs twice-- but only if iCal
is not running at the alarm time.
Here's my favorite part. If I set two alarms for an iCal event, with
the first one being simply "open file iCal" and the second one being
the script, the script only runs once (I set the trigger time for the
script to be one minute after the "open file iCal" alarm.)
I thought maybe I could write a script that first opened iCal, then
delayed for one minute, then did the "real" script, but it too runs
twice.
tell application "iCal"
activate
delay 60
display dialog "yo"
end tell
--(runs twice)
I tried "launching" iCal in advance (getting desperate):
tell application "iCal" to launch
tell application "Finder"
activate
display dialog "yo"
end tell
--(runs twice)
Any hints? iCal 1.5.2, OS X 10.3.5. Thanks.
--
cb
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden