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 Syncing > iCal Sync
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
sync to iCal as events for due dates? Thread Tools Search this Thread Display Modes
I'll try to make it back around to this script and make these modifications when I get a chance. In case someone gets ambitious and wants to take a stab at it before that happens...

It looks like iCal just defaults to 15-minute events when presented with one that has a start date or an end date but not both. The workaround would be to do some math in the script to manufacture whichever value is missing, then set both start and end date values according to whatever duration was wanted.

As for the links, it looks like the iCal export code is doing some extra work behind the scenes to get those links to work. The script would need to duplicate that work. Currently it does a good job of making links that look like the ones that OF makes during the export, but they aren't actually the same thing.

To get this fixed, I would need to get one of the developers to explain how this code works and then hack something together that does the same thing in Applescript. (This change is somewhat less likely to happen, in other words.)
 
Quote:
Originally Posted by tah View Post
By audit, I don't mean anything sophisticated. Just that I can look back and see my gantt chart in the past.
Just remind me of TimeOffice (http://www.macupdate.com/info.php/id/16795/officetime) ... sounds like a great solution for what we all end up doing : spending our time and (at least in my case) not being quite sure how it went ... hope it helps ...

By the way, 100% agree with Greg and his comments ... sometimes trying to put too many things in one tool usually leads to waste of time. Re-reading GTD is always necessary, and productive !


Saludos

AM
 
Please also see this thread.

I was inspired to write a bit of a problem/solution brainstorm. I’ve got some feature requests for OF (been using for about 6 months), and I wanted to check Forums first. I’ve read all posts to the two big threads on “time visualization” but by no means have I read every thread, so pardon me please if I’m wasting your time. Also: truly sorry for the length, tried to edit down!

The “problem” here is that we’re all looking for ways to simplify the process of productivity (or completion, or “doing”), whatever that means to each one of us. However we live really complicated, busy, integrated lives, and we’ve all access to an overabundance of “info/choices/projects/tasks” (see!?). IMO when we say simplify we mean “easy and elegant”, because what I’m looking for is a way to manage the way my ideas integrate with so many other parts of my life. Excel is brilliant if all I wanted was to have lists of things (to-do, to-see, to-read, to-think-about, etc); box.net means I can keep them in one place and access them anywhere (a Google Docs solution without the Big Brother!); but that just doesn’t close the book on the issue at all, because I want more.

To address this problem, for me it’s useful to think about how I’d go about being productive if all I had was a pad and a calendar. Let’s say (for example) you have a list of projects; a list of one-off tasks; some life goals (“someday” in GTD); a list of things you’re waiting on; maybe some other “single-action” lists (e.g. movies you’d like to see, restaurants to try, upgrades to your company website); maybe some repetitive actions which you’d like to be reminded of, some of which are time-specific.

That list of projects needs to be broken down – how do I get the project done, when can/should I take time to work on the project? One-off tasks are typically some sort of errand or phone call or reminder, usually with a due date, but not in need of scheduling. Life goals are projects waiting for the greenlight. Single-action lists like “The Movie List” or “Topics to Research” or “Website Ideas” are another form of reminder, typically without time sensitivity until the point when you decide to focus on them. Repetitive actions can carry a hard date (clean apartment), or maybe a hard interval (change filter after 3 months of use).

For projects, Gantting is so useful because it’s about mapping out task durations. Maybe there’s a deadline, but otherwise Gantting is agnostic of dates. You’re not planning out your day-to-day, but rather estimating the timing of tasks given the processes involved vs. what your day-to-day schedule will throw at you in terms of meetings, errands, leisure, etc.

Following along with the situation I posed above, you’re in essence doing 3 interrelated but mutually exclusive things. You’re certainly listing out all the projects and tasks you need to complete. You’re mapping out (on a pad, or maybe some graph paper) the duration of tasks so you can manage the projects from a timing perspective. You’re also scheduling out date-specific tasks and meetings (on your House, MD wall calendar), which of course gives you the ability to see when you’ll have free time to work on your projects and other things from your lists. Integrated!

OmniFocus lets me list tasks, projects, “single-action” lists, etc. OmniPlan lets me map out my projects. iCal lets me schedule. Each has features and ways that overlap with the others. For me, the simplest solution (also: the only one I can think of that doesn’t run into all of the problems discussed, particularly by Greg Jones) is linking. In the same way that you might have reports/query tables in a database that pull up information in other tables (e.g. a movie title in a movie database will pull up every account that rented that movie, thereby linking to/outputting account information), so would I want to see OF operate.

Given my thesis that tasking, project management and scheduling are distinct-yet-interrelated, and using the example I hypothesized above, it would seem there is a certain amount of information in place in a well-managed OF database that doesn’t need to be recreated in OP or iCal, but there is some information that is missing and needs input. OF has start and due dates, it’s got durations. But that doesn’t translate to an iCal entry, because you’re not blocking out an entire week for a task with a start-date/end-date delta of one week. Similarly, setting durations in OF can be quite unscientific if you’re trying to map out a complex, multi-step project. The thing we believe in, the reason we’re all on this forum, is that OF is the center, or the “glue,” of this process. If you accept this, then maybe you’re really looking for a way to make this easy and elegant rather than trying to fit it all into one program.

OF is awesome because it’s first and foremost the best task-list. In one place you’ve got everything you want or need to do, sort-able and group-able any which way. And for those tasks you might want to either manage in OP or schedule in iCal, here’s my solution: Have a way to link OF tasks to entries in OP or iCal, such that the info is then reported back in OF.

For example, if I have a task in OF with start and due dates (“scan hard copies of housing data” – something that might take hours and hours over multiple sessions, but doesn’t need to have separate/multiple OF tasks), I might schedule in 90 minutes on Tuesday, two hour-long sessions on Wednesday, and another 2 hours on Friday. OF will tell me that I’ve scheduled in 5-and-a-half hours in iCal when the duration I estimated in OF is 3 hours or 7 hours. It will tell me that Friday is after my OF due date (Thursday). It will physically list out the three iCal times you’ve linked up to the single OF task (in a [day], [date], [starttime]-[endtime] format, e.g.). For the sake of elegance and ease, I can see there being two buttons in the Inspector box of each OF action which will send you to either OP or iCal. Alerts are set in iCal, managing is done in OP, and all you’ve really done is an API data dump in OF.

Another example: I’ve got a project/tasks in OF that are linked to an OP file. Pushing around and tweaking the project in OP will change the “linked” output in OF, alerting me to conflicts. I understand that Omni is looking into OF/OP integration, so making changes in OP might negate actually having to resolve those conflicts manually in OF.

Other examples: You can opportunistically link items from your “single-action” lists; for instance, you’re finally going to see that movie or you’ve finally gotten a reservation at that restaurant. Likewise, repetitive tasks will benefit from having duration (in the form of a calendar entry rather than a to-do item) as well as an iCal alarm.

What is this “linking” besides not having to retype a task/project/context name? Well, it’s the peace of mind (and automatic error checking) that we’re looking for in a system, especially when we’re learning to trust that system. We know that we have to schedule or Gantt manually, but personally I’d be more content if it were linked rather than in many disparate places (sticky note on my computer monitor at home), and I could see that link when I pull up an OF task. Of course I’m surely missing some sort of optimization or some place where data re-entry is unnecessary. Please critique and run with this if useful!
 
Hi, I've been trying to figure out a way to give myself reminders of tasks that are easy to forget. I often forget to check my iphone at opportune times and I rely on iCal reminders. I was trying to get this script to work and it creates a task in iCal but it creates the start and finish time based on when I last modified the task in OF, or maybe it's when ran the script. Also, there is no alarm and I made sure it is set to TRUE in the Script editor. What am I doing wrong?

Thanks...

Quote:
Originally Posted by Brian View Post
Okay, it was pretty trivial to modify the script to create an event for each action instead of a To Do. Just like the other script, if you have one or more actions selected, they get added to iCal. If you have no actions selected, it adds all flagged items.

Creates an event that matches the start and end dates if both exist, otherwise makes a 15-minute event at whichever of the two does. If one of the events has no start or end date, it stops and tells you there's a problem.

Just like the other script, you need to open it up in Script Editor once to make a couple of settings - whether there's an alarm, how long before the event the alarm fires, etc.

Thanks, of course to uku, snarke, and yeary, who wrote the 99% of the code I just ended up copy-and-pasting. :-)
 
Quote:
Originally Posted by marshallj View Post
I was trying to get this script to work and it creates a task in iCal but it creates the start and finish time based on when I last modified the task in OF, or maybe it's when ran the script. Also, there is no alarm and I made sure it is set to TRUE in the Script editor. What am I doing wrong?
If you've changed anything in the script, you may want to try re-compiling it, saving it, and running it again. It's possible that saving a script forces a recompile, but I wouldn't take it for granted.

I wrote the script on a 10.5.6 machine, and everything seems to be fine when I re-run it on a different 10.5.6 one; if you're running a different version of the OS, that *may* be why you're seeing something different.

The script defaults to having an alarm 24 hours before the events you're creating, so that shouldn't require any modifications.

If you delete the script, download again, and reinstall without changing anything, what happens?
 
Sorry to jump on this thread late, but I've had the following script running every hour for while now and it does a good job of giving me iCal events for OF tasks with due dates, and hence iPhone reminders. It differs from the others that I've seen by putting all tasks with a due date into a dedicated calendar (OF-Reminders, which you'll have to create before you run the script).

Script follows:


-- Creates iCal events for OmniFocus tasks
-- Events are created for 3 categories of task

-- 1 All tasks in the context named by morningContextName will have an event created the next day at morningContextTime
-- 2 Any task with a due date _and_ time will have an event created at that date and time
-- 3 Any task with a due date but no due time will have an all day event created

-- All events are created in the calendar named by targetCalendar, and with the alarm named by eventSoundName
-- The targetCalendar is cleared every run

-- If you synch targetCalendar with your iPhone over MobileMe this will give you iPhone notifications of due tasks


set morningContextName to "for work"
set morningContextTime to 7 * 3600
set eventSoundName to "Submarine"
tell application "iCal"
set targetCalendar to calendar "OF-Reminders"
tell targetCalendar
delete every event
end tell
end tell

tell application "OmniFocus"
my onTasks(inbox tasks of default document)
my onFolders(default document)
end tell

on onFolders(folderList)
using terms from application "OmniFocus"
repeat with eachFolder in folderList
onProjects(projects of eachFolder)
onFolders(folders of eachFolder)
end repeat
end using terms from
end onFolders

on onProjects(projectList)
using terms from application "OmniFocus"
repeat with eachProject in projectList
name of eachProject
onTasks(tasks of eachProject)
end repeat
end using terms from
end onProjects

on onTasks(aTaskList)
using terms from application "OmniFocus"
repeat with eachTask in aTaskList
onTask(eachTask)
onTasks(tasks of eachTask)
end repeat
end using terms from
end onTasks

on onTask(aTask)
using terms from application "OmniFocus"
if aTask is completed then
return
end if
set theContext to context of aTask
if theContext is not missing value then
set contextName to name of theContext
else
set contextName to missing value
end if
set taskDue to due date of aTask
set eventName to eventNameFor(aTask)
if taskDue is not missing value then
createEvent(eventName, id of aTask, taskDue)
else
if contextName is equal to my morningContextName then
set alarmTime to nextAlarmTime(my morningContextTime)
createEvent(eventName, id of aTask, alarmTime)
end if
end if
end using terms from
end onTask

on eventNameFor(aTask)
using terms from application "OmniFocus"
if containing project of aTask is missing value then
set projectName to "InBox"
else
set projectName to name of containing project of aTask
end if
if context of aTask is missing value then
set contextName to ""
else
set contextName to name of context of aTask
end if
return name of aTask & "(" & contextName & ":" & projectName & ")"
end using terms from
end eventNameFor

on createEvent(aSummary, anID, aDate)
tell application "iCal"
tell my targetCalendar
-- if (time of aDate) is equal to 0 then
-- return
-- end if
set existingEvents to every event whose (summary is equal to aSummary) and (start date is equal to aDate)
if existingEvents is not {} then return
if time of aDate is equal to 0 then
set newEvent to make new event at end with properties {summary:aSummary, start date:aDate, allday event:yes}
else
set newEvent to make new event at end with properties {summary:aSummary, start date:aDate, end date:aDate}
end if
if time of aDate is not equal to 0 then
tell newEvent
make new sound alarm at end with properties {trigger interval:0, sound name:my eventSoundName}
end tell
end if
end tell
end tell
end createEvent

on nextAlarmTime(timeSecs)
set now to current date
set alarmDay to now
if time of now is greater than my morningContextTime then
set day of alarmDay to (day of alarmDay) + 1
end if
set time of alarmDay to timeSecs
return alarmDay
end nextAlarmTime


-- Left for reference
on onContexts(contextList)
repeat with aContext in contextList
my onContext(aContext)
end repeat
end onContexts

on onContext(aContext)
using terms from application "OmniFocus"
onContexts(contexts of aContext)
onTasks(tasks of aContext)
end using terms from
end onContext
 
Quote:
Originally Posted by Brian View Post
Okay, it was pretty trivial to modify the script to create an event for each action instead of a To Do. Just like the other script,
OK, it is the other script I'm looking for, the one that moves To Dos.
 
Don't know if I'm understanding what you're looking for. The original script was one that moved an action from OmniFocus to iCal, but did so as a ToDo. (The scripts mine was based on are in this thread.)

It sounds like you want a script that converts a ToDo to an event in iCal. Google search turned up a couple of hits, but drag-and-drop seems easiest.
 
Quote:
Originally Posted by Brian View Post
Don't know if I'm understanding what you're looking for. The original script was one that moved an action from OmniFocus to iCal, but did so as a ToDo. (The scripts mine was based on are in this thread.)

It sounds like you want a script that converts a ToDo to an event in iCal. Google search turned up a couple of hits, but drag-and-drop seems easiest.
Thanks Brian,

Actually I've been convinced the better workflow for now would be to move selected (Flagged, I hope) items to iCal To Do and then I can drag them to Events as I'm ready, that assuming I don't go with OF's built in iCal syncing, which I haven't tried yet (trying to get everything else organized first).

So the one you've linked will work better for me I hope. Maybe someday I'll be ready to move directly into Events, but one step at a times works for me.
 
dmcg ... you did it! ... I think this is pretty much what everyone has been looking for .. works great on this end .. thanks a bunch.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sync iCal events into OmniFocus SpiralOcean OmniFocus 1 for Mac 4 2012-04-16 10:35 AM
Sync tasks with due-dates to iCal-calendar? [See "Replacing Calendar Sync" thread.] tkaufmann iCal Sync 34 2011-02-10 03:25 PM
Is there a way to get OF tasks that have Due Dates to appear in iCal as Events? martlume OmniFocus for iPhone 2 2009-01-13 03:30 PM
Any way to sync to iCal dates? TV Dog iCal Sync 3 2008-01-12 03:21 PM
Dates wrong after sync in iCal tastiger iCal Sync 13 2007-12-10 07:00 AM


All times are GMT -8. The time now is 05:23 PM.


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