The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus 1 for Mac (http://forums.omnigroup.com/forumdisplay.php?f=38)
-   -   Automatically create a waiting for task? (http://forums.omnigroup.com/showthread.php?t=10017)

alexius 2008-09-26 10:01 AM

Automatically create a waiting for task?
 
Hi all,

What I would love is to be able to check off an action such as "e-mail betty re: shipping" and then automatically have a new task (with the same description) created in a "waiting for" context. The idea is I don't forget that I want to hear back from her.

It's important for my own accounting purposes that I can record this as 'sent' (so I can't simply change the contexts).

Any suggestions for a workflow?

whpalmer4 2008-09-26 11:46 AM

You could simply duplicate the task before checking it off as complete, then change the context in the duplicate to your "Waiting For" context. Click on the little dot to the left of the action name to select it, cmd-D to duplicate, change the context. Not automatic, but easy.

curt.clifton 2008-09-26 12:07 PM

How 'bout a script based solution? A Complete and Wait For Response script could duplicate the item, check-off the original, and assign the duplicate to the waiting for context, perhaps with an optional future start date. You could add this to the toolbar for easy mousing.

I might be persuaded to bang this together if I thought someone would find it useful. (No promises; this weekend is booked solid and next week is looking scary.)

(In my ideal world, I would be able to write a script that is automatically executed whenever an item is checked off. Then I could check whether the completed action is in a particular context, say Email, and automatically create a related Waiting For item. Perhaps in OmniFocus 3.0.)

watchit 2008-09-26 03:51 PM

That would be great, Curt. I find myself manually duplicating actions for follow ups all the time. tia.

ext555 2008-09-27 07:15 AM

Curt, when you get time : ) I'm sure a lot of people would find it useful .
I know lots of times , in a rush I forget to create follow up WF's ..

CorgiGirl 2008-09-27 04:24 PM

Hi Alexius

I was having the same issue. Duplicating for me seemed a little counter-intuitive so I ended up using the FLAG to indicate "waiting" vs. priority. Works very well, is a quick fix, and avoids a case of Michael Keaton's movie Multiplicity in my database ;)

curt.clifton 2008-09-27 05:28 PM

Script completed
 
I found some time to bang this script together. You can download it from [URL="http://www.rose-hulman.edu/~clifton/software.html#Await"]my software page[/URL]. Here's the marketing blurb:

[I]This script marks the selected action as complete and creates a new action, like the selected one but prefixed with "Reply on:" and placed in your Waiting For context. Great for email and other actions where you expect a reply.[/I]

You can change the prefix to your liking by opening the script in Script Editor. You can also tweak the name of your waiting for context if the script doesn't guess correctly. (It looks for the first context with the letters w-a-i-t in it.)

This has had very limited testing—much less than I usually like—but there seemed to be demand, and I didn't want folks to wait too long. I don't think the script could do much damage even if it has a weird bug.

Share and enjoy!

ext555 2008-09-28 02:27 AM

thanks curt! I'll try it out today

alexius 2008-09-29 12:50 PM

This is great! Thanks for all the responses and especially to Curt for the script! I will let you know how it works out for me.

Thanks again!

Alex

gcrump 2008-10-01 02:13 AM

Curt,

Awesome stuff! Thanks.

George

steve 2008-10-29 04:09 PM

Can this be put in the user folder or does it have to be in the main computer file? I can't get it to work in my local library.


Thanks,
Steve

curt.clifton 2008-10-30 05:45 PM

I use it in my ~/Library/...

steve 2008-10-30 07:52 PM

~ is root, right?

I'm not authorized to authenticate my computer in ~/Library/...

Off hand, do you think the script could be modified to work in the local library?

steve 2008-10-30 07:58 PM

Actually, maybe it doesn't work because I can't install growl without the administrator password of my machine. grrrr.

update. . . it works when I deleted all references to growl in the applescript. Thanks!

whpalmer4 2008-10-31 02:09 AM

[QUOTE=steve;49765]~ is root, right?

I'm not authorized to authenticate my computer in ~/Library/...

Off hand, do you think the script could be modified to work in the local library?[/QUOTE]
You've already fixed the problem, but for future reference, ~/ refers to your home directory, ~user/ refers to user's home directory.

steve 2008-10-31 07:43 AM

whpalmer-- thanks for the clarification.

Curt, thanks for the amazing script.

If anyone is inclined, one thing that might make it better is to add "if Reply on:" exists then don't add it to the row. One of these days I need to learn applescript.

curt.clifton 2008-10-31 11:21 AM

[QUOTE=steve;49766]Actually, maybe it doesn't work because I can't install growl without the administrator password of my machine. grrrr.

update. . . it works when I deleted all references to growl in the applescript. Thanks![/QUOTE]

Yeah, I have an item on my list to make my scripts check for the presence of Growl and work without it. That's a fairly significant amount of work relative to ease of installing Growl, or so I thought. I hadn't consider folks without admin privileges.

I'll work on the scripts the next time I need to productively procrastinate.

X.R. 2008-11-11 01:20 AM

the script doesn't work for me.
I get this error message : "Le script «*Complete and Await Reply*» n’a pas pu s’achever. AppleScript a rapporté l’erreur suivante*:
Erreur dans OmniFocus*: Attempted to move data objects to a nil container."
I'm using Omnifocus 1.0.3
I've installed Growl
mac os x 10.5.5
and obviously from my System + OF are in French. Maybe this is the problem?
let me know when you feel like doing some productive procrastination.

best.

oschultz 2008-11-11 09:38 AM

Another idea
 
Curt thanks for the script.

The way I had been handling all of this is just to add "WF - persons name" to the beginning of the task, and changing the context to Waiting For. If I am in context view I just drag and drop it to the menu on the left. If I'm in project view I just click on the context from the drop down menu in the task. It is a fast process.

In addition, I use textpander. I have created a short cut for the letters "msg" that automatically types out "Left message (and the date and time)". The date and time are set up with strings within the program so you customize it to your liking. I also have a snippet for the letters "eml" that automatically types out "Emailed (and the date and time)" This is awesome for follow up. For instance, it allows you to very quickly run through your @calls list and update your tasks with precise information. Some of these tasks have several "msg" snippets in them which allows me to instantly see the history of that task. I can then call again and say "Hey there, I left you a message about this topic on the following dates and still have not heard from you" works wonders for pushing projects forward, and keeps a nice record for reporting to the boss on one's progress.

Turning a task into a "waiting for" is almost as satisfying as checking it off.

curt.clifton 2008-11-12 01:35 PM

I'd doubt the French localization is the problem. I suspect the problem is either that you're running OF 1.0.3--I'm on 1.5--or, more likely, that you don't have a context with the string "wait" in its name. In the latter case, you can edit the script to include the proper name for your Waiting For context.

rebunkerjr 2009-03-07 04:12 AM

Much appreciated - very helpful for my workflow.

rebunkerjr 2009-03-08 12:17 PM

After using the script for a bit, I need to hack it just a bit to include the original Context in the task that's placed into the "Waiting" context.

If you haven't tried this nice little script, essentially what it does is copy the highlighted task(s), marks the original task(s) "Complete" (leaving it in the original context) and then putting the duplicated task into the "Waiting" context. It prepends the task in the Waiting context with text of your choice (I have mine set to "Awaiting:").

Due to the way that I use contexts, particularly for Agenda items, I need a bit more info in the copied task. I want to put a trailer on the task that shows the original context (remember, the copied task is now in the "Waiting" context).

With the current script, the task in the Waiting context looks like this:
Awaiting: bla bla bla

I would like it to look like:
Awaiting: bla bla bla From:originalContext (e.g. Agenda)

Alternatively it could simply be:
Awaiting from originalContext - bla bla bla

Either way, the trick is to capture the original context. I tried the following (only a portion of the original script) but I get an error.

set itemTitle to name of anItem
[COLOR="Blue"]set oldContext to context of anItem[/COLOR]
set theDupe to duplicate anItem to after anItem
set completed of anItem to true

-- Configure the duplicate item
set oldName to name of theDupe
[COLOR="Blue"]set name of theDupe to waitingPrefix & oldName & " From: " & oldContext[/COLOR]
set context of theDupe to theWaitingForContext
set repetition of theDupe to missing value

Any suggestions?

Thanks!

rebunkerjr 2009-03-08 01:19 PM

Got it! One of these days I should learn AppleScript ;)

Here is the final snippet (changes in blue):
set itemTitle to name of anItem
[COLOR="Blue"]set oldContext to name of context in anItem & ": "[/COLOR]
set theDupe to duplicate anItem to after anItem
set completed of anItem to true

-- Configure the duplicate item
set oldName to name of theDupe[COLOR="Blue"]
set name of theDupe to waitingPrefix & oldContext & oldName[/COLOR]
set context of theDupe to theWaitingForContext
set repetition of theDupe to missing value

Note: I also changed the prefix as follows:
property waitingPrefix : "@"

As a result, the new task in the Waiting context looks like this:
@Phone: Call Tony to discuss bla bla bla

Warwick 2009-06-23 02:02 AM

Curt - Thanks very much I have just downloaded it but not used it yet however I wanted to say thanks before I forgot. Its a nice solution and the growl feature is a stylish touch. BTW I love your where to focus script to.

pault6 2009-06-23 01:46 PM

Thanks Curt, the script works flawlessly on my system and will save my fingers in the future. Should have discovered it sooner.

Paul

Katpaust 2009-07-31 12:19 PM

Curt - this seems to be exactly what I have been looking for. I have previously used the Outlook Add-in for GTD, which had different buttons for waiting for, delegate, ect. However, after having moved to Mac I find that I am missing the simplicity of this Add-in. I have tride to download your script, but as I am a newbie in the script world. I don't seem to be able to figure out how this works. How do I tell OF when to use this script? I do not find a button to "push" and cannot find this in any drop down list. Sorry about being so stupid - hope you can "spoon feed" a little. Thanks! Kari Anne in Oslo, Norway.

curt.clifton 2009-07-31 01:01 PM

Kari Anne,

First you need to create a directory to hold any OmniFocus scripts:
[LIST=1][*] Open a Finder window and click on Library (under PLACES in the side bar) [*] Go to the Scripts folder[*] Under Scripts, go to Applications. If this folder doesn't exist, then create a new folder and give it that name. [I]If you're using a Norwegian localization, these names might be different. I'm not sure.[/I][*] Having found or created Applications, create a folder inside it called OmniFocus.[*] Copy the script file to the new OmniFocus folder.[/LIST]
Now if you quit OmniFocus and restart it, OF will notice that there are some scripts. If you right-click on the tool bar in OF, you can choose to customize it. Scroll down through the various buttons and you'll find the scripts. You can drag the Complete and Await Reply button onto the toolbar.

Hope that helps!

sawxray 2010-03-28 06:06 PM

Great Script! Could I ask for more?
 
Curt-

Great script! I have been using it from my toolbar, and have a keyboard shortcut I created in Keyboard Maestro. It is quite useful for emails and phone calls, where it acts as a reminder that can be completed if the person responds, or I can follow up if I don't hear back.

I made the modifications that Rebunker suggested, and customized it to my liking.

But I do have a request, which I have been unable to solve with several hours of tinkering with AppleScript (I am a newbie to AppleScript):

Is there a way of creating a dialog box that would allow one to set new dates for follow-up? In other words, how could I invoke the script, have it ask me for the days/weeks/months to delay, and then create the new task in the Waiting For context, with new dates (so that it doesn't show up until I want it to)?

Could I create a new property:

[I]property defaultFollowUp : 3[/I] ?

Then, could I create a dialog box such as this:

[I]display dialog "Follow up in how many days?" default answer defaultFollowUp buttons {"Cancel", "OK"} default button 2[/I] ?

And then how would I get the script to modify the start date and due date within OF?

I tried for quite some time reviewing this script, and the excellent 'Defer' script by Dan Byler, which has a dialog box that allows such modifications, but was not able to get the script to complete.

Again, I am quite the noob with AppleScript, so i appreciate any input folks might have.

Cheers!

sawxray 2010-03-28 06:45 PM

Partial solution
 
1 Attachment(s)
I fiddled quite a bit more with both scripts, and believe I am almost there. The enclosed AppleScript borrows from Curt ('Complete and Await Reply'), Dan Byler ('Defer' script), and Rebunker (modifications in this thread, just above).

The only problems I have are:

1. It is probably much longer than it needs to be;
2. For multiple items, it asks for the days of follow up, and whether you want to alter the start date, due date or both, sequentially for each of the items you selected.
3. If I hit 'Cancel', the script completes anyway, and I get the message, "AppleScript reported the following error: OmniFocus got an error: User canceled."

For number 1, if an AppleScript maven can tidy it up, bravo!

For number 2, if an AppleScript maven can pull out the name of each item, and include this in the dialog, double bravo!

For number 3, can anyone point me in the right direction? Hopefully this is an easy one for someone who knows more than I about AppleScript. I would like to get rid of this message.

In short, I have this set up so that when I leave a task in someone else's hands, I can automatically place the task in the 'Waiting For' context, place the previous context in the title, defer the task for a fixed number of days, and then have it pop back into my consciousness at that time.

Let me know if you all have any questions or ideas!

Cheers!

amitsbajaj 2013-07-11 04:27 AM

Looking for updated script for this action
 
This post is extremely late to the party so forgive that aspect.

With my workflow, I have actually assigned a search perspective, searching for the word !Email because I want to keep my context specific to the issue at hand rather than having it all over many contexts.

With this script, I want to be able to create a new "Waiting for" task once I complete the "Email" task, but to be in the same context it is in now. So if a task is in Customer A context, I want the waiting for to remain in that context.

Is that possible with this script?

Thanks,
Amit


All times are GMT -8. The time now is 02:18 AM.

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