Я могу использовать iCal для создания нового события.
tell application "iCal"
tell calendar "Todo"
set new_event to make new event at end of events
tell new_event
set start date to date "Friday, May 6, 2011 4:00:00 PM"
set end date to date "Friday, May 6, 2011 4:30:00 PM"
set summary to "Feed ferret"
set location to "Home 2"
set allday event to false
set status to confirmed
end tell
end tell
end tell
Однако, когда я использую переменную для замены строки, я получаю сообщение об ошибке.
tell application "iCal"
tell calendar "Todo"
set new_event to make new event at end of events
set m_date to "Friday, May 6, 2011 4:00:00 PM" --> variable m_date
tell new_event
set start date to date m_date --> Error
set end date to date "Friday, May 6, 2011 4:30:00 PM"
set summary to "Feed ferret"
set location to "Home 2"
set allday event to false
set status to confirmed
end tell
end tell
end tell
Почему я не могу использовать переменные для настройки события iCal?