PDA

View Full Version : Running scripts from OF toolbar - limitations


RobTrew
2008-03-07, 06:11 AM
It seems that not all scripts can be successfully run from the OF toolbar.

In another post (http://forums.omnigroup.com/showpost.php?p=33542&postcount=1) 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.

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


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
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.


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 ...

tell application "OmniFocus"
close every window
end tell

Ken Case
2010-06-17, 11:46 PM
This crash is fixed in the most recent sneaky peek build.