The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Running scripts from OF toolbar - limitations (http://forums.omnigroup.com/showthread.php?t=7425)

RobTrew 2008-03-07 06:11 AM

Running scripts from OF toolbar - limitations
 
It seems that not all scripts can be successfully run from the OF toolbar.

In [URL="http://forums.omnigroup.com/showpost.php?p=33542&postcount=1"]another post[/URL] I reported that static variables lose their state between runs, and here is a script which runs happily from a script editor, but will immediately crash Omnifocus (build 98208) if you try to run it from the toolbar.

[CODE]tell application "OmniFocus"
close every window
tell default document
make new document window with properties {focus:{}, search term:""}
end tell
end tell
[/CODE]

I don't recommend that you try this, incidentally.

A better approach is to assign Quicksilver keyboard triggers to particular applescripts. (The script above, for example, runs fine when launched from the keyboard by Quicksilver).

RobTrew 2010-06-17 12:22 AM

[QUOTE=RobTrew;34052]here is a script which runs happily from a script editor, but will immediately crash Omnifocus ... if you try to run it from the toolbar.[/QUOTE]


Two years later, in addition to its other limitations, the OF toolbar script-running mechanism still seems to retain a crashing defect.

The following simple script, which exits gracefully when run from the OF script menu, still instantly crashes OF on my system when run from the OF toolbar ...

[CODE]tell application "OmniFocus"
close every window
end tell[/CODE]

Ken Case 2010-06-17 11:46 PM

This crash is fixed in the most recent sneaky peek build.


All times are GMT -8. The time now is 08:46 AM.

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