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 1 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Planning Forward / Applescript Thread Tools Search this Thread Display Modes
I regularly take certain next-actions and "schedule" them for a future date. A good example would be submitting my work expense report, I have that as a repeating action, occurring the 5th of each month, with a time estimate of 1 hour. I have many things with future dates, either single actions on a project or a recurring event.

What I would like to be able to do (either in OF itself, or via an AppleScript that extracts data) is plan / print a future daily task diary. I envision something like:

Monday m/d/y (Total 3hrs)
  • Task A, 2hrs
  • Complete Expense Report, 1hr
Tuesday m/d/y (Total 7hrs)
  • Task B, 3hrs
  • Task C, 1hr
  • Task D, 3hrs

From that type of list I can look forward and make sure I didn't overcommit myself for a given day.

Are there any good ways to get this type of information as an OF perspective? What would be a good suggested way in AppleScript to look forward like this?
What you describe is not quite GTD. The basic idea is that you throw many projects/tasks into a black box. At any time, when you want to get something done, and depending on where you are (or other context), you ask the box what to do and it either tells you what task to do (a next action), or in OF you can get a list of available tasks to do and you decide which is more appropriate.

OF is not a scheduler - you don't indicate that task A is to be done tomorrow, task B is for the day after, etc.

One consequence of GTD is that you can't really tell what you'll be doing in one week. Also, most tasks don't have a hard due date (otherwise they should be in your calendar), if you can't do it today (assuming it's next/available), then try doing it tomorrow. Thus, you shouldn't be overcommitting for any one day.

Of course there are exceptions to all rules!
I get it that OmniFocus is focused (pun intended) on GTD methodology. I didn't need a dogma response.

My question specifically included AppleScript as I fully expect that I would need to do some external coding.

The question remains, to others like myself who have coded some AppleScripts for OF: any hints or ideas or possibly useful coding techniques to gather OF data in a way that would enable a forward planning format?
Originally Posted by SkydiveMike View Post
I get it that OmniFocus is focused (pun intended) on GTD methodology. I didn't need a dogma response.
That was not at all clear to me on reading your original post. So don't be too hard on pvonk, as pvonk's response was an attempt to be helpful.

I see what you are trying to do, and I have the same sort of problem at work. I make liberal use of the Export feature (CSV), refine my project status reports in Excel, and import into MS Project as needed. This is not the AppleScript or OF Perspective approach that you want, but it is an approach that would accomplish your objective.
Omni plan does a great job reading the export files also , and it can do what mike is looking for . OF is primarily a GTD tool though , and in my opinion , OMNI needs to pull the statement about it being suited for " a variety of task management methods " until / if ever more features are added to the current set . I can't think of any major " method " other than GTD that could be accomplished using OF .
Exporting through CSV to Excel may be the best route for the moment. It looks syntactically possible to query the full set of OF tasks in Applescript (to avoid exhaustive and repeated iteration) but the results seem very buggy (see test code below)

I have submitted a report.

tell application "OmniFocus"
	tell window 1
		set selected view mode identifier to "project"
		set focus to {}
		select library of sidebar
		tell content
			set refLeaves to a reference to leaves
			-- get total count of tasks
			set intTotal to count of refLeaves
			set lstSubSet to refLeaves where note of value ≠ ""
			set intHasNote to count of lstSubSet
			set lstSubSet to refLeaves where note of value = ""
			set intNoNote to count of lstSubSet
			set intDiscrepancy to intTotal - (intHasNote + intNoNote)
			display dialog "Gap: " & intDiscrepancy as string
			set lstSubSet to refLeaves where ((due date of value) is (current date))
			set intToday to count of lstSubSet
			set lstSubSet to refLeaves where ((due date of value) > (current date))
			set intAfterToday to count of lstSubSet
			set lstSubSet to refLeaves where ((due date of value) < (current date))
			set intB4Today to count of lstSubSet
			set intSecndDiscrepancy to intTotal - (intToday + intAfterToday + intB4Today)
			display dialog "Second Gap: " & intSecndDiscrepancy as string
			-- ODDEST RESULT -- Small positive number - hard to explain
			set lstSubSet to refLeaves where ((due date of value) ≠ (current date))
			set intOdd to count of lstSubSet 
			display dialog "Odd value for tasks with due date NOT today: " & intOdd as string
		end tell
	end tell
end tell
Well, even though OF is really a GTD tool, I am using it largely successfully for my system which is a combination of Mark Forrester's DIT system and GTD. The DIT "will-do" list is the piece that is the most difficult to accomplish in OF which is why I was looking at Applescript solutions. I can do "tomorrow's" closed list by viewing my "will-do" context in action mode, grouped and sorted by Start Date. This gets cumbersome once OF gets to the point of grouping to "start within next week" or "start within next month".

I like the marketing line of "a variety of task management methods" since a variety of methods is what I use ;)

Thanks for that code sample; I had seem some of those unpredictable results, prompting my question. I will probably end up doing something that will have multiple iterations of the file - I'll post it if I ever get it to a point where I am "using" it.

I was able to generate my manager-required "weekly status report" via AppleScript, but as that deals with projects, items completed on the projects, and project status it was much eaiser.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shift Project forward 1 year? pairustwo OmniPlan General 3 2013-04-12 10:55 AM
Forward motion jhncbrwn Applying OmniFocus 8 2010-05-04 09:50 AM
rolling forward boupierre OmniFocus 1 for Mac 2 2009-03-14 10:43 AM
Forward broken neilio OmniWeb Bug Reports 1 2006-05-17 09:06 AM

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

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