By Danny @Danny_van_Spreuwel
How do I click an UI element with the command key pressed down?
I tried the "Set Keyboard Modifier State" action to enable but it didn't affect the elementClick.
sf.keyboard.modifiers({
isCommand: true,
});
sf.ui.proTools.automationWindow.buttons.whoseTitle.is('Enable AutoJoin Mode').first.elementClick();
Linked from:
- Christian Scheuer @chrscheuer2020-07-30 17:53:06.834Z
Hi Danny
To simulate a keyboard press held down while clicking on a UI element, you also need to simulate the mouse part.
Click UI Element uses UI Automation, but Pro Tools doesn't register modifier keys when we use UI automation.To simulate a mouse click relative to a UI element, (while holding down a modifier key or not), use the "Mouse Click Relative to UI Element" action.
Use the "Hold Command" property set to "Yes" to make it work.Danny @Danny_van_Spreuwel
Yes, that's it. It works now. The command key was hidden behind the gear icon.