I’ve made a ton of progress.
This works to create a project:
tell application "Tinderbox 9"
tell front document's selection
set noteName to name
set noteURL to value of (attribute named "NoteURL")
end tell
end tell
tell front document of application "OmniFocus"
set theProject to make new project with properties {name:noteName, note:noteURL}
set omniFocusID to id of theProject
end tell
tell application "Tinderbox 9"
tell front document's selection
set value of (attribute named "Badge") to "link"
set value of (attribute named "Color") to "poppy"
set value of (attribute named "KeyAttributes") to "URL;"
set value of (attribute named "OmniFocusID") to (omniFocusID)
end tell
end tell
This works tp create tasks on an existing project.
tell application "Tinderbox 9"
tell front document's selection
set theTaskName to name
set theTaskText to value of (attribute named "Text")
set theProjectID to value of (attribute named "OmniFocusProdID")
set noteURL to value of (attribute named "NoteURL")
set theStatus to value of (attribute named "Status")
end tell
end tell
tell front document of application "OmniFocus"
set theProject to first flattened project where its id is theProjectID
tell theProject
set theTask to make new task with properties {name:theTaskName, note:theTaskText}
set omniFocusTaskID to id of theTask
end tell
end tell
tell application "Tinderbox 9"
tell front document's selection
set value of (attribute named "Badge") to "link"
set value of (attribute named "Color") to "poppy"
set value of (attribute named "URL") to ("omnifocus:///task/" & omniFocusTaskID)
set value of (attribute named "OmniFocusTaskID") to (omniFocusTaskID)
end tell
end tell
Now, what I can’t figure out is the following:
- how to pass a dueDae that Omnifocus will accept
- how to pass the status of the task or project to OmniFocus
- how to test if taskID already exists and if it does not not recreated it by rather pull updates from Omnifocus into Tinderbox
- Retrieve new tasks created in OmniFocus project and add them to the TBX
- pass tags from Tinderbox to OmniFoucs and visa versa
- how up pull updated changes, e.g. status, back to Tinderbox