Trying again - RobTrew script WhereInOF

There is a very helpful script for OF 1 called WhereInOF that no longer works for OF 2. It can be found at:

This is what it can do when it works:

– Find and optionally select OmniFocus tasks, projects, or contexts by entering
– applescript-like command line queries, or choosing them from a list saved in a text file.
– The syntax is that of an Applescript WHOSE / WHERE clause,
– (The query should begin with the words “where”/“whose” and tasks / projects / contexts)
– Assisted query-building is available, with lists of available properties,
– drop-down lists of possible query clauses
– and prompting for entry of date, number, and search string values
– Queries entered manually or saved in the library may include the place-holders:
– – for strings
– – for integers
– – for dates
– The query-handler will prompt the user to supply appropriate values,
– and both the “filled” and “template” forms of succesful queries will be stored
– in the MRU (most recently used) list.
– There are currently two minor extensions to the applescript query language:
– - The terms today/yesterday/tomorrow/soon may be used in place of dates.
– - Searches may be prefixed by the term ‘archived’

About a year ago I asked the forum whether anybody could take a look at it and try to fix it. At the time I got no takers. I figured I’d give this one last try so:

Are there any programmers out there who can take a look at this script/app and figure out what’s wrong? I’d be greatly appreciative!