von bodo » 24 Dez 2009, 08:34
Could you try to execute this Applescript:
Code: Alles auswählen
property myTVCalendar : "TV-Browser"
on stringToList from theString for myDelimiters
tell AppleScript
set theSavedDelimiters to AppleScript's text item delimiters
set text item delimiters to myDelimiters
set outList to text items of theString
set text item delimiters to theSavedDelimiters
return outList
end tell
end stringToList
on getDateForISOdate(theISODate, theISOTime)
local myDate
-- converts an ISO format (YYYY-MM-DD) and time to a date object
set monthConstants to {January, February, March, April, May, June, July, August, September, October, November, December}
set theISODate to (stringToList from (theISODate) for "-")
set myDate to date theISOTime
tell theISODate
set year of myDate to item 1
set month of myDate to item (item 2) of monthConstants
set day of myDate to item 3
end tell
return myDate
end getDateForISOdate
tell application "iCal"
if (exists (calendars whose title is myTVCalendar)) then
set TVBrowserCalendar to first item of (calendars whose title is myTVCalendar)
else
set TVBrowserCalendar to make new calendar with properties {title:myTVCalendar}
end if
set startDate to my getDateForISOdate("2009-12-24", "22:10")
set endDate to my getDateForISOdate("2009-12-24", "22:10")
set props to {start date:startDate, end date:endDate, summary:"ProSieben - Constantine", description:"ProSieben - Constantine 24.12.2009 22:10-22:09 John Constantine kam mit der Gabe auf die Welt, Halbblut-Engel und –Dämonen zu sehen, die als Menschen getarnt unter uns leben. Diese Visionen trieben ihn in den Selbstmord. Doch er wurde aus der "}
set theEvent to make new event at end of (events of TVBrowserCalendar) with properties props
make new display alarm at beginning of theEvent with properties {trigger interval:-0}
end tell
This should create a Calendar Entry. If not it should show you an error message. I just commited a little more Log-Info into the SVN. If you build the tvbrowser now, it will log additional informations into the log file.
Could you try to execute this Applescript:
[code]property myTVCalendar : "TV-Browser"
on stringToList from theString for myDelimiters
tell AppleScript
set theSavedDelimiters to AppleScript's text item delimiters
set text item delimiters to myDelimiters
set outList to text items of theString
set text item delimiters to theSavedDelimiters
return outList
end tell
end stringToList
on getDateForISOdate(theISODate, theISOTime)
local myDate
-- converts an ISO format (YYYY-MM-DD) and time to a date object
set monthConstants to {January, February, March, April, May, June, July, August, September, October, November, December}
set theISODate to (stringToList from (theISODate) for "-")
set myDate to date theISOTime
tell theISODate
set year of myDate to item 1
set month of myDate to item (item 2) of monthConstants
set day of myDate to item 3
end tell
return myDate
end getDateForISOdate
tell application "iCal"
if (exists (calendars whose title is myTVCalendar)) then
set TVBrowserCalendar to first item of (calendars whose title is myTVCalendar)
else
set TVBrowserCalendar to make new calendar with properties {title:myTVCalendar}
end if
set startDate to my getDateForISOdate("2009-12-24", "22:10")
set endDate to my getDateForISOdate("2009-12-24", "22:10")
set props to {start date:startDate, end date:endDate, summary:"ProSieben - Constantine", description:"ProSieben - Constantine 24.12.2009 22:10-22:09 John Constantine kam mit der Gabe auf die Welt, Halbblut-Engel und –Dämonen zu sehen, die als Menschen getarnt unter uns leben. Diese Visionen trieben ihn in den Selbstmord. Doch er wurde aus der "}
set theEvent to make new event at end of (events of TVBrowserCalendar) with properties props
make new display alarm at beginning of theEvent with properties {trigger interval:-0}
end tell[/code]
This should create a Calendar Entry. If not it should show you an error message. I just commited a little more Log-Info into the SVN. If you build the tvbrowser now, it will log additional informations into the log file.