Automating a Double Click

I'm slickening up some automation - invoking Edit on a JavaScript step in a Drafts action on Mac.

This automation is driven by Keyboard Maestro - with much of it being an AppleScript step.

At one point I need to double click on a UI table row. Today I do it by double clicking at a fixed position in the window. I want to eliminate that fragility.

So, how do double click on a UI table row? Or, for others who might stumble across this, how do I double click on any element?

Happy with either AppleScript or KM answers.

Hi @MartinPacker, have you ever tried one of these two KM actions?

Thanks @appleianer. I know about these two.

I suppose I could use "Found Image". Obviously that's pretty crappy, too. And the Absolute Position one doesn't help me as I don't know where the row is. (I already use Relative To Window Top Right Corner and wanted to do better than that.)

If I could extract the position of the row I could use that. But I don't know how to.

In fact "Found Image" works quite well. But I still find it a fragile idea.

What exactly do you want to click in Drafts / UI table row? Could you create a screenshot?

In this screenshot the only way to get to work with action "To GraphViz" seems to be to double click on it. If there's a better way I'd love to hear it.

(Stretch objectives would be to be able to select by text from the table on the left and also (same thing) the table on the right. Right now I'm doing it by row number.)

You could create a custom shortcut for "To GraphViz". I'm not very familiar with the scripts, but could this help you?

2020_09_07_Support_1

If you want to pass a text to the software GraphViz, you might want to use the Share menu if the software is included.

The issue here is editing the action's javascript, not running the action.

"To GraphViz" is my own action - discussed here. There is no built in ability to export in GraphViz .dot file format. That's what my action creates.

And I'm actually trying to handle the general case. That is of any action whose javascript I'm developing. (There is no shortcut for that so I'm building one in Keyboard Maestro / AppleScript UI Scripting.)