Hallo Forum und Profis
hatte mir heute mal die Vorlagen in Devonthink angesehen und dort unter
- Neu mit Vorlagen
- Register
- Tickler File
die Vorlage installiert. Dort gibt es ein script, welches aber auch nach Anpassung der Readme nicht funktioniert. Ist die nicht überarbeitet oder funktioniert diese mit der aktuellen Version nicht? (Da dort halt auch noch thinkpro2 steht, was ich aber angepasst hatte auch DNtp)
- Tickler File
-- Script to add a selected record in the electronic Tickler File System to iCal as a full day reminder with an alarm
-- Date, Month and Year picked up automatically from the Tickler Files
-- Written by Luc Beaulieu with portion from the original iCal script of Eric Böhnisch-Volkmann (DEVONtechnologies, LLC) left intact
-- Set properties: Please change user dependent variables here - Note that my iCal calendar name if Tickler...
property pPrefix : "Tickler Reminder" -- Prefix for the created to do item
set MyAlarmHour to "09"
set myAlarmMinute to "00"
set myAlarmSecond to "00"
set MyCalendar to "Tickler"
try
-- Get the selection
tell application id "com.devon-technologies.thinkpro2" to set thisSelection to the selection
tell application id "com.devon-technologies.thinkpro2" to set this_database to the current database
tell application id "com.devon-technologies.thinkpro2" to set this_path to path of this_database
-- Error handling
if thisSelection is {} then error localized string "Please select a document or group, the try again."
if (length of thisSelection) > 1 then error localized string "Please select only one document or group, then try again."
-- Get and format the data we need
set pLocalizedPrefix to localized string pPrefix
tell application id "com.devon-technologies.thinkpro2"
set thisItem to first item of thisSelection
set theSummary to (pLocalizedPrefix & ": " & name of thisItem) as string
set theURL to ("x-devonthink-item://" & uuid of thisItem) as string
set MyMonths to parent of thisItem
set MyMonth_name to first item of MyMonths
set nameM to (name of MyMonth_name) as string
set MyMonth_num to texts 1 thru 2 of nameM
end tell
-- Tickler item will be set as a full day reminder, I pick 9AM for the alarm
set alld to true
set AlternateDate to current date
set day of AlternateDate to name of thisItem
set month of AlternateDate to MyMonth_num
set hours of AlternateDate to MyAlarmHour
set minutes of AlternateDate to myAlarmMinute
set seconds of AlternateDate to myAlarmMinute
-- …Make sure were are in the right year, a Tickler file system must be continuous!
if AlternateDate is less than (current date) then
set year of AlternateDate to (year of (current date)) + 1
end if
-- prepare for iCal event creation (not sure it is really needed)
set theStartDate to AlternateDate
set theEndDate to theStartDate + (1 * hours)
-- Add new to do to iCal (section from Eric Böhnisch-Volkmann)
tell application id "com.apple.iCal"
tell calendar MyCalendar
-- Create new to do
set theEvent to make event with properties {summary:theSummary, start date:theStartDate, end date:theEndDate, allday event:alld, url:theURL}
tell theEvent
set theAlarm to make display alarm with properties {trigger date:theStartDate, trigger interval:-15}
end tell
-- Show new to do item in iCal so that the user can edit it right away
view calendar MyCalendar at theStartDate
show theEvent
activate
end tell
end tell
-- This section is only for BusyCal users (I am one!)
-- Quit iCal and go to BusyCal
--tell application id "com.apple.iCal"
--quit
--end tell
--tell application id "com.busymac.busyCal"
--activate
--end tell
on error errMsg
display alert (localized string "Error when adding item to iCal") message errMsg
end try