The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniPlan Extras (http://forums.omnigroup.com/forumdisplay.php?f=45)
-   -   Applescript to set Stat holidays (http://forums.omnigroup.com/showthread.php?t=18378)

frederickfowles 2010-10-05 05:06 PM

Applescript to set Stat holidays
 
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

[/CODE]


All times are GMT -8. The time now is 09:53 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.