Does anyone know a better way of finding the reminder that contains the cursor (the current reminder or active reminder) than this?
Thanks!!!
on getActiveReminder()
set theResult to 0
tell application "Reminders"
activate
set theList to the list "Tasks"
tell application "System Events"
keystroke "a" using {command down}
keystroke "c" using {command down}
set copiedName to the clipboard as text
end tell
set theCount to the number of reminders in theList
repeat with i from theCount to 1 by -1
if copiedName = name of reminder i of theList then
set theResult to i as integer
exit repeat
end if
end repeat
end tell
return theResult
end getActiveReminder