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