Member
2008-08-29, 09:03 PM
When running the above script, you need to run it from inside Omnifocus, so that the front window call gets you the front window. Alternatively, you can use the description "first" window (assuming that is the topmost) which will work within script-editor.
Note that "first window" will give you an error unless the script is run within omnifocus.
-Allen
ps- remove "try" commands to see the errors that get thrown otherwise.
Update: I'm using the following subprogram in a project I'm working on right now...
Code:
on SetSearch(searchstring)
tell application "OmniFocus"
tell front document
tell document window 1
set search term to searchstring
end tell
end tell
end tell
end SetSearch
Last edited by a11en; 2008-08-30 at 01:07 PM..