The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Obj-C Access to Complete method Thread Tools Search this Thread Display Modes
I am working on a command line tool that interfaces with Omnifocus via obj-c's scripting bridge. I want to use the complete call to fuzzy-match contexts and project names.

Code: http://github.com/cschneid/omnifocus...ntFinder.m#L59 (sorry for the unlinked url, had to create a new forum name for myself).

Problem 1: The complete call isn't generated as part of the Omnifocus.h that is built from osx tools (sdef /Applications/Omnifocus.app | sdp -fh --basename Omnifocus). This prevents me from using ScriptingBridge like I use for other calls.

Problem 2: I get around the first problem by building up an applescript string and sending that, but every single approach I use either doesn't compile correctly, or fails to coerce the string into a project object.

The compile errors are odd, since if I stop the debugger and print the string that I'm using as applescript, and then copy/paste it into AppleScript Editor, it runs find and returns the value I expect, with no problem.

I've gone through many iterations of the code here, and can't figure it out.


If you want to check out the code and run it, invoke it with "Run (cmd-option-r)" and set the command line options to [--task, "Test #aproject"] (2 args). Or run it from the command line as `omnifocus --task "Test #aproject"`

Also note that the rest of this tool does work currently for adding tasks. Check it out if interested - it's just a clone of OTask at the moment though.

Thank you to anybody who can help!

Last edited by cschneider; 2012-02-14 at 01:12 PM..
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
CalDAV setup - method not allowed Rook OmniPlan General 7 2013-01-05 08:41 AM
Most Secure Sync Method? Don1 OmniFocus 1 for Mac 2 2011-10-20 12:29 PM
which method for OF for Mac is fastest? toruviel OmniFocus Syncing 1 2010-10-24 04:54 PM
Fastest Method of Syncing blueteq iDisk/MobileMe/.Mac Syncing 4 2010-08-26 02:54 PM
Tasks complete/ part complete move to start of project? Omni User OmniPlan General 1 2008-06-16 11:08 AM


All times are GMT -8. The time now is 12:27 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.