Code: Select all
use script "CalendarLib EC" version "1.1.3" -- put this at the top of your scripts
use scripting additions
set theStore to fetch store
set theEvents to fetch events by UID "<UID>" event store theStore
try
remove event event item 1 of theEvents event store theStore with future events
on error theErr
return "NotFound"
end try
Please note that other conventional AS scripts, that don't use the Shane's library, work fine, like creating new events or the following (check if Calendar.app is open or not)
Code: Select all
set appName to "Calendar"
if application appName is running then
tell application appName
--activate
set TheVis to the visible of front window
if TheVis is false then
set the visible of front window to true
--keystroke "0" using command down
end if
end tell
return true
else
return false
end if
Any clues?
Trevix