Making sub-contexts in AppleScript?
I can't seem to correctly make a subcontext, ie. "@Foo : bar". I can create @Foo, but when I try to create 'bar' as a subcontext of @Foo, it just creates it as a separate context (rather than a hierarchical one that you get if you drag and drop it).
I'm using code based on code by Curt Clifton, based on code by zooids, as follows: set contextList to complete thePrimaryContext as context maximum matches 1 set contextID to context id (id of first item of contextList) set newContext to make new context with properties {name:theSecondaryContext, container:contextID} Despite saying "make this in the container contextID", it appears as a separate context. Any ideas? thanks! N |
Just guessing, but you might try an incantation like:
make new context at after first context of context contextID with properties {name:theSecondaryContext} |
Got an error:
906:1009: execution error: OmniFocus got an error: Can’t make context id "euSiwjFnDkn" of document id "b8S4l1DdM81" into type integer. (-1700) What I've ended up doing is just creating all the contexts and then dragging them into the right hierarchy...! thanks Curt! :-) N |
You could take a look at the "PlaceContextPath()" function in [URL="http://web.mac.com/robinfrancistrew/Site/iGTD2Omnifocus_files/iGTD2Omni_Ver41.applescript.zip"]iGTD2Omni_Ver41.applescript.zip[/URL]
|
All times are GMT -8. The time now is 06:06 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.