Leyendo información de iCal del archivo para hacer el evento de iCal
Tengo un archivo (/test.txt) que contiene información del evento iCal.
Friday, May 6, 2011 4:00:00 PM
05/08/2011 11:20:00 PM
summary
location
Friday, May 6, 2011 4:00:00 PM
05/08/2011 11:20:00 PM
summary
location
Y este es el applecript para leer este archivo para hacer que iCal sea un evento.
set Names to paragraphs of (read ("/test.txt"))
set my_list to {}
set temp_list to {}
repeat with nextLine in Names
if length of nextLine is greater than 0 then
set temp_list to temp_list & nextLine
else
copy temp_list to end of my_list
set temp_list to {}
end if
end repeat
repeat with e in my_list
set my_list to {}
tell application "iCal"
tell calendar "Todo"
set new_event to make new event at end of events
tell new_event
repeat with j from 1 to count e
set content to item j of e
if j is 1 then
set start date to date content --> Error
end if
if j is 2 then
set end date to date content
end if
if j is 3 then
set summary to content
end if
if j is 4 then
set location to content
end if
end repeat
end tell
end tell
end tell
end repeat
Ejecutar este código me da un error
¿Por qué es este error?