Why does this Applescript not work when a task is in the inbox?
It works when a task is not in the inbox.
tell application id "OFOC"
tell front document
tell content of document window 1 -- (first document window whose index is 1)
set theSelectedItems to value of every selected tree
if ((count of theSelectedItems) < 1) then
display alert "You must first select an item to complete." as warning
return
end if
repeat with EachItem in theSelectedItems
set status of EachItem to active status
end repeat
end tell
end tell
end tell
Any insight is appreciated.