My database takes so long to switch between views that I try to avoid doing this sort of thing, and so don't take note of what others may have contributed to do it. It does seem to me that someone had posted something similar, but I didn't find it in the first few pages of results in the OmniFocus Extras forum, so I rolled my own. Perhaps someone else remembers what I do not.
tell application "OmniFocus"
tell front document window of default document
set curTaskState to selected task state filter identifier of content
if (curTaskState is "all") then
set curTaskState to "available"
set curTaskState to "all"
set selected task state filter identifier of content to curTaskState
This script will flip the task status filter for the front document window between Any Status and Available each time it is invoked. If you have some other status displayed, it will switch to Any Status. You could put the script in the toolbar via View→Customize Toolbar... and have one-click access (seems like anything more would be less convenient than just twiddling the view bar setting by hand).
Searching around a bit, perhaps this is what I saw: http://www.sandro.org/omnifocus/index.php#cyclestates