2
我是Mac新手。我有大約50個經常性事件沒有指定結束日期。 我打算將所有經常性事件更改爲特定的結束日期。我正在尋找一個蘋果腳本來改變它在一次運行。謝謝!!Apple腳本將iCal結束日期中的所有事件更改爲一個特定日期
我是Mac新手。我有大約50個經常性事件沒有指定結束日期。 我打算將所有經常性事件更改爲特定的結束日期。我正在尋找一個蘋果腳本來改變它在一次運行。謝謝!!Apple腳本將iCal結束日期中的所有事件更改爲一個特定日期
以下腳本應該做你需要的。您需要將標題從「主頁」更改爲您感興趣的日曆的名稱。而且您需要將結束日期從「20130902」更改爲您需要的任何內容(採用YYYYMMDD格式)。
無論出於何種原因,iCal中,似乎從這個結束日期減去1天,所以在這個例子中,結束日期都將被設置爲9月1日2013年
tell application "Calendar"
repeat with thisCal in (calendars whose title is "Home")
setEndDate of me to "20130902" for thisCal
end repeat
end tell
on setEndDate to endDate for thisCalendar
tell application "Calendar"
repeat with thisEvent in (events of thisCalendar)
if recurrence of thisEvent is not missing value and recurrence of thisEvent does not contain "UNTIL" then
set recurrence of thisEvent to recurrence of thisEvent & ";UNTIL=" & endDate
end if
end repeat
end tell
end setEndDate