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

 
Scripting support for Date entry shortcuts Thread Tools Search this Thread Display Modes
I'd love to be able to access the OmniFocus date entry shortcuts via
AppleScript. E.g. the ability to type things like

Quote:
• 2d, -3w, 1h, 1y1m, and so on — Relative dates and times put the date
at a certain amount of time from right now. Negative numbers
represent times in the past.
• 2 days, -3 weeks, 1 hour, 1 year 1 month, and so on — You can use
the full names of units too.
• yesterday, tomorrow, next thursday, last month, this friday, and so
on — You can refer to relative dates using common words. “This”,
“next”, and “last” have specific meanings: this friday always means
the Friday in this week, next friday always means the Friday in the
next week, and last friday always means the Friday in last week,
regardless of what day today is. Other units work in the same way.
• september, thurs, 2019, and so on — If you enter the name of a
specific time period, the date will be at its beginning. So
september means Septem- ber first.
• 5/23/08 10a, 9.30.09 2:00 PM, and so on — You can use the short date
format as defined in your International system preferences.
...as specified in the OmniFocus manual.

The OmniFocus `complete` command seems like a good candidate to
implement this. Possible usage:

Code:
	tell application "OmniFocus"
		tell front document
			set newDate to (complete "next thursday" as date)
		end tell
	end tell
This would be _extremely_ useful in streamlining certain actions.

I've emailed support@omnigroup.com to request this feature... if others think this would be useful, please email them too! :)
 
Quote:
Originally Posted by dbyler View Post
I'd love to be able to access the OmniFocus date entry shortcuts via
AppleScript.
(In the meanwhile, if you lift the hood of Where in OF you will find a simple (and, I hope, reusable) applescript implementation of a subset of these things.)

Last edited by RobTrew; 2012-07-17 at 05:54 AM..
 
Wow, Rob—that is a seriously impressive 2832 lines of code. I may extract your date parsing code at some point... although it would certainly be easier to use
Code:
(complete "next thursday" as date)
:)
 
It used to be only about 1200 lines of code. Rob was a little slow to catch on that I had an endless stream of feature requests, and doing one didn't mean that I would be satisfied and go away, but rather that I would be encouraged to ask for another, more complicated one :-)
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vote for further start date support in Forecast view [Email support for OG #631951] analyticalbiochemist OmniFocus for iPad 6 2011-05-19 04:40 PM
Help with Date Entry amandapetunia OmniGraffle Extras 1 2008-06-26 12:40 PM
Scripting project, context in Quick Entry iNik OmniFocus Extras 0 2008-06-20 09:14 AM
Quick Entry : no more due date ? LeBenoist OmniFocus 1 for Mac 4 2007-12-10 11:34 AM
Due date with quick entry? Craig OmniFocus 1 for Mac 2 2007-05-24 03:46 PM


All times are GMT -8. The time now is 07:10 PM.


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