It works well. But I wish I could make a switch case there. If Show All History menu item exists, then activate it and do cmd + F search. If not, then do Hide History and don't do cmd + F search after.
Unless I'm missing something it doesn't appear that Switch/Case has any way to determine a given menu item's state, so it looks like you'd need to rely on If Then Else instead:
Does it? That's strange; your original version is faster, but reliability-wise it appears to work fine me. The only issue I noticed was that sometimes the Find field wouldn't always be selected by the ⌘F action, and adding a Pause Until action seems to fix it as long as you're not rapidly flipping back and forth between the two views:search history.kmmacros (5.7 KB)