I saved several "folders" with specific search criteria. Then I wrote KM script to open each, BUT I like to view and possible edit the search criteria. That is what generated my questions. Many times it works. However,
Selecting "Show/Hide Search Criteria" not a menu item in the Finder main menu bar (two bar on the screen that is). Only in the window itself.. I had it working on the Finder window--until, of course, I changed the size of the window--then KM misses because I think I could only choose relative to the coordinates of the corner? How do I select it reliably?
Also, I don't see how to select it ONLY if it wasn't already selected! OR check what it says (Hide or Show)?
Personally I would use AppleScript and System Events, but that get's complicated – especially across system versions and individual customizations in the Finder.
This method will probably work well enough for you.