I am trying to applescript the setting of stat holidays from an iCal calender but I am a newbie to this and its not working any help would be great.
Code:
tell application "iCal"
set startDates to start date of every event of calendar named "Canadian Holidays"
set endDates to end date of every event of calendar named "Canadian Holidays"
end tell
tell application "OmniPlan"
tell front document
repeat with rIndex from 1 to count of resources
tell calendar day schedule of resource rIndex
repeat with eIndex from 1 to count of startDates
subtract work time from "12:00 AM" to "11:59 PM" on (item eIndex of startDates)
end repeat
end tell
end repeat
end tell
end tell