I want to assure the Grep box is checked in the Find dialog.
I've tried if-then, using "a button with the name 'Grep' is off/on, enabled/not enabled, exists/does not exist" and Keyboard Maestro seems oblivious to this dialog box. (I'm just testing by letting a sound action play for the if-then.) Also, I'm triggering with a keystroke so it's not actually focused on Keyboard Maestro.
Thanks for the reply! The toggling shortcut is great, but how do I know if it needs to be togged to be checked? Is there a way Keyboard Maestro can evaluate whether or not it's checked, so I'll know whether I need to toggle?
It's a little confusing that it's labelled "Use Grep" when, if it's already checked, it really means "Don't use Grep!" It would be handy if it just made sure it was checked, no matter what.
BTW, my BBEdit uses Ctrl Sh G for this, rather than Ctrl Opt G.
BBEdit is highly scriptable, including the equivalent of the Find dialog.
If you would like to provide a real-world, detailed, example of your source data, and what you'd like to find, then we can probably provide you with an example you can use.
Sorry, I was under the impression you wanted something that would click the buttons while you had the Find window open in front of you, so you'd know whether they were checked or not. Apparently, what you want is to fiddle with the nature of the Find within another automation. For that situation, @JMichaelTX has the right answer: use BBEdit's AppleScript dictionary to control the Find options.
As for the Option/Shift thing, it's likely I changed my shortcuts 100 years ago and have fooled myself into thinking they're the defaults.
I rarely use BBEdit, just for occasional Grep text manipulation, so the free version does what I want. I got the idea to use Keyboard Maestro to simulate the paid version's "Text Factory" tool by just scripting entry into the Find dialog in a series of macro groups. Before those groups run, I want to be sure the Grep box is checked.
Here's a screenshot of the macro template I've made, where I learned Keyboard Maestro really can't see what's going on in the Find dialog, having it play a sound if a button named "Grep" even exists. Someone suggested AppleScript might do this? Thanks!