Hi,
im trying with applescript since 1 week, somthing is working fine, somthing not.
1) Is there an easy way to get a task by id? Can't find anything.
2) So please have look to my coding, I try to get all contexts from omnifocus.
Example:
node1
node11
node111
node12
node2
In the main part of my script i try to get all contexts with child contexts (node1). With this node, I will call my subroutine to get the child nodes. This sub routine should be called in a recursive way to receive all contexts. But i have developed a endless loop. In my coding mycontext2 is every time node1.
Any ideas? Thanks in advance Paul
im trying with applescript since 1 week, somthing is working fine, somthing not.
1) Is there an easy way to get a task by id? Can't find anything.
2) So please have look to my coding, I try to get all contexts from omnifocus.
Example:
node1
node11
node111
node12
node2
In the main part of my script i try to get all contexts with child contexts (node1). With this node, I will call my subroutine to get the child nodes. This sub routine should be called in a recursive way to receive all contexts. But i have developed a endless loop. In my coding mycontext2 is every time node1.
Any ideas? Thanks in advance Paul
Code:
tell application "OmniFocus" tell first document repeat with mycontext in contexts set myCounter to count of contexts in mycontext if myCounter > 0 then my getContextChilds(mycontext) end if end repeat end tell end tell on getContextChilds(mycontext2) tell application "OmniFocus" repeat with myChildcontext in mycontext2 set myChildContextName to name of myChildcontext my getContextChilds(myChildcontext) end repeat end tell end getContextChilds
Last edited by PaulMeier; 2010-09-07 at 06:29 AM..