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)
-   -   Some OmniFocus Scripts (http://forums.omnigroup.com/showthread.php?t=3880)

pjb 2007-07-14 05:25 AM

Is the new Mail in Leopard going to have some of this tagging built in?

curt.clifton 2007-07-14 06:50 AM

[QUOTE=pjb]Is the new Mail in Leopard going to have some of this tagging built in?[/QUOTE]

My scripts aren't really taking advantage of tagging, just MailTags's fast linking directly to Mail messages. If Leopard Mail provides better AppleScript support for opening messages, then I will probably eliminate the dependency on MailTags.

smorr has posted [URL="http://www.indev.ca/forum/viewtopic.php?t=940"]a compare-and-contrast table for Leopard Mail vs. MailTags[/URL]. As the developer of MailTags he certainly has a vested interest, but the comparison seems valid to me.

Danoz 2007-07-14 09:27 PM

Hi Curt,

I have downloaded and tried to use the Populate Template script, But I run into the following error:

[QUOTE]OmniFocus got an error: Can't make root task of task id "eS6O-B1pQd5" of document id "o5x33Qg9Atx" into type reference.[/QUOTE]

Script Editor hangs on this line:
[QUOTE] set theTask to {(get root task of selectedItem)}
[/QUOTE]

Changing this to:
[QUOTE] set theTask to {(get root task of selectedItem)} as reference
[/QUOTE]
*I can't remember exactly where I put the as reference, inside the brackets or braces or outside*
seems to fix this issue, but then I get another similar error down in the "onReplacePlaceholders" module.

Any suggestions as to what I can do?

Thanks.

curt.clifton 2007-07-15 04:50 AM

Danoz,

I'm able to replicate the error. It occurs when you try to use the script on a subproject. Currently the script only handles top-level projects. Good catch!

I'll fix the bug and post a new script.

curt.clifton 2007-07-15 05:12 AM

The new version of my Populate Template Placeholders script is available from [URL=http://www.rose-hulman.edu/~clifton/software.html]my software downloads page[/URL].

johnrover 2007-07-15 10:00 AM

Curt– Thanks again for these awesome scripts.

Is it possible to set the default context? or perhaps a handful of default contexts with different Act on key combinations for each?

curt.clifton 2007-07-15 10:49 AM

[QUOTE=johnrover]Is it possible to set the default context? or perhaps a handful of default contexts with different Act on key combinations for each?[/QUOTE]

It would be straightforward to hardcode a context in the script. You could make copies of the script for each context, then fire the one that you want from the Act-On rule.

Danoz 2007-07-15 05:48 PM

[QUOTE=curt.clifton]Danoz,

I'm able to replicate the error. It occurs when you try to use the script on a subproject. Currently the script only handles top-level projects. Good catch!

I'll fix the bug and post a new script.[/QUOTE]

Thanks so much Curt.

I understood from one of your other posts that you made a new project called "Templates" and inside that project you stored your (well...) templates. So these were then sub-projects, I guess.

This is how I set up my templates area to work with your script. Did I misunderstand you? Anyway, it should be resolved now.

Thanks again.

Update...
In running the script as I intimated above (my templates are all stored in an on hold project called "Templates" and my templates are all sub projects there), the script does not run at all. It errors out at the first instance, suggesting I don't have a project selected.

I tried moving the template out and made it a new project in it's own right - ie it showed up in the left hand column of all projects, but still encountered this problem.

Any suggestions? How could the count of projects or trees be < 1? I definitely have it selected.

Thanks.

curt.clifton 2007-07-15 06:08 PM

[QUOTE=Danoz]
I understood from one of your other posts that you made a new project called "Templates" and inside that project you stored your (well...) templates. So these were then sub-projects, I guess.

This is how I set up my templates area to work with your script. Did I misunderstand you? Anyway, it should be resolved now.[/QUOTE]

I use a top-level [I]folder[/I] called Templates with projects inside it.

[QUOTE=Danoz]
In running the script as I intimated above (my templates are all stored in an on hold project called "Templates" and my templates are all sub projects there), the script does not run at all. It errors out at the first instance, suggesting I don't have a project selected.[/QUOTE]

You need to select the project in the main content pane, not in the sidebar.

Keith 2007-07-19 08:43 PM

[QUOTE=curt.clifton]I think so.

I posted [URL="http://www.rose-hulman.edu/~clifton/software.html"]new versions of my scripts[/URL] last night that use MailTags. (We're replacing a domain server today—Sat., July 14—so the link may only work sporadically.)[/QUOTE]


The "Add OmniFocus Action" script did nothing for me until I deleted the "on assistiveDevicesSupportEnabled()" by revising it to automatically return a "true" result:

on assistiveDevicesSupportEnabled()
-- check to see if assistive devices is enabled
return true
end assistiveDevicesSupportEnabled

It seems to have been choking on the "set UI_enabled to UI elements enabled" line. Now it works fine. (I already had assistive devices enabled, of course; could it have made a difference that I am running the Finder and all my other programs in Japanese?)

As for the "Open Linked Mail Message" script, it works when I run it from the Script menu or from ScriptEditor, but not when I run it by clicking it in the OmniFocus toolbar. Odd.


All times are GMT -8. The time now is 01:39 AM.

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