The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Problem with "Complete & await reply" script (http://forums.omnigroup.com/showthread.php?t=15272)

Clive 2010-02-10 05:30 AM

Problem with "Complete & await reply" script
 
Applescript reported:
The script could not complete.
OmniFocus got an error:

Can't get context 1 of document 1 whose id = jFn5x2rjkg3". Invalid index.

It used to work well for me.
Rebuilt the database, compacted the database, to no avail.

Any suggestions?

curt.clifton 2010-02-10 02:59 PM

Hey, Clive,

The problem almost certainly has nothing to do with your database of projects and actions.

Did you perhaps rename or rearrange your contexts? The script searches for the first context with "wait" in its name. As I recall, the script requires that context to be at the top level, i.e., not nested inside another context.

(For others reading, [URL="http://www.rose-hulman.edu/~clifton/software.html#Await"]the script in question[/URL] is available from [URL="http://www.rose-hulman.edu/~clifton/software.html"]my software page[/URL].)

Clive 2010-02-10 11:24 PM

Issue correctly identified
 
[QUOTE=curt.clifton;73094]
The script searches for the first context with "wait" in its name. As I recall, the script requires that context to be at the top level, i.e., not nested inside another context.

(For others reading, [URL="http://www.rose-hulman.edu/~clifton/software.html#Await"]the script in question[/URL] is available from [URL="http://www.rose-hulman.edu/~clifton/software.html"]my software page[/URL].)[/QUOTE]

Aha! Exactly so! I moved it to nest with other 'waiting' type items. Moving back has fixed it.
A warning to all about such scripts!.
Thank you.

johnrover 2010-11-22 07:07 AM

Thanks Clive. I was having the same problem.

Curt: Is there any way to direct the script to a nested context. I need to have my "WF" (waiting for) context nested for some of my perspectives to function properly....

whpalmer4 2010-11-22 08:09 AM

1 Attachment(s)
I've modified the script slightly to handle this situation. Thanks to Rob Trew for posting the solution long ago!

johnrover 2010-11-22 09:29 AM

Awesome. thanks!

macula 2011-09-21 02:17 PM

Bill, thanks for the updated script. I have a thorny problem with it, though: It works like a marvel when launched from the Applescript Editor. But when launched from the OF toolbar, it yields this:

[CODE]AppleScript reported the following error:
«script» doesn’t understand the FindContext message.[/CODE]

Any ideas? Thanks.

whpalmer4 2011-09-21 08:44 PM

As the file has a .applescript extension, it's just the source, not a compiled version. Open it in Applescript Editor, click the Compile button, and save it as Complate and Await Reply.scpt in the OmniFocus script directory. Then reinstall it in the toolbar and you should be set.

macula 2011-09-21 09:26 PM

How ridiculous is this? I was totally unaware that Applescripts require compilation. I thought it was a language interpreted on-the-fly.

Many thanks for the enlightenment.


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

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