Alt-click or "isOption" click is not working in macros or scripts.
Alt-click or "isOption" click is not working in macros or scripts.
System Information
SoundFlow 5.8.3
OS: darwin 22.6.0
ProductName: macOS
ProductVersion: 13.5.1
BuildVersion: 22G90
Steps to Reproduce
- Use macro that has click relative to UI position, or any other click where you can add modifiers.
- Try to click with Optioin/Alt click option selected
- Macro clicks but no Option held.
- Tried with this suggestion: https://forum.soundflow.org/-5776/mouse-click-not-pressing-command-key#post-3
- Changed Command out from above link to be isOption:
- Still just a regular click...
Expected Result
A click with option held down at the same time.
Actual Result
Just a regular click.
Workaround
No.
Other Notes
I've tried as a macro and a script, and this is holding me up a good bit from being able to do a full automation that I'd like to get sorted out.
Links
User UID: WCZ3rWqZiigPbgF3hGw133m3aue2
Feedback Key: sffeedback:WCZ3rWqZiigPbgF3hGw133m3aue2:-OIJdFjxA_wiEuImvZ2Q
Feedback ZIP: WoFrPq5hgWhkqL5159iB8NEzSxNOZJ6rPM+OiwOdTUsQIzoP4fEwVSypsA5Y+UYjgrWesRCoaWJy58T4BJ0ItaW0U0ySyXG1FyrH2DGDfzZDCc98PiX6tpzgyzKz6KCcKxi32nr8w7bir0ZkY9sMXIWt5v26s9HVOSWtPAeH+wa063S5aY5J/YOxcxvv9upI9xcVraDfG6O2g7eeNezGLr6+BIBh3+c3rbvscagR/d206bsAk66xQUX/W4JxIzVGEjqcD828jiimGjS7q9lVMvhQmQaCppONta9lZwBLC9c57nWrqYKg7fSgTXlaMs7q4v6TsFmVyYRg+6QzuW49i0i9kkt67wkwzACHS5qgU88=
- Christian Scheuer @chrscheuer2025-02-05 14:41:23.917Z
Hi Phineas,
Can I get you to copy/paste the script or macro you're using here so we can take a look at the code you've been running?
Generally, you need to use mouse simulation when combining with keystrokes, for Pro Tools (or Logic) to pick up the keystrokes. So, use "Mouse Click Relative to UI Element" instead of "Click UI Element". Perhaps you're already doing that, but it'll be easier once we can see your macro/script to determine if it's a problem in the script or might be a bug somewhere.
You can also use the "script help" workflow for help with specific scripts/macros - this ensures the script/macro gets copied into the forum post automatically, saving a step:
https://soundflow.org/docs/help#script-help- PPhineas OBrien Milne @Phineas_OBrien_Milne
Hi Christian,
I sure can. As I noted above, I do use "Mouse Click Relative to UI Element" as this gives the option to choose a modifier. I understand that using mouse simulation is the only way to combine keystrokes, and I've treated this as such so far. I'm still not getting the desired result. I've used
Here's the macro:
{"command":{"folderKey":"cm6jo8gxn0001731087ldjtlo","name":"Alt Click","type":"macro","id":"user:default:cm6rh2neq0000uv104da9ka13","data":{"root":{"_type":"RootNode","body":[{"_key":"actionNode1","_type":"ActionNode","actionId":"mouse.clickElement","props":{"isOption":{"const":true}},"title":"Mouse Click Relative to UI Element"}],"uid":"root"},"v":3},"bindings":{},"_packageKey":"default","_commandKey":"cm6rh2neq0000uv104da9ka13","_packageName":"Default Package","_isCustom":true,"_isInstalled":false,"bindingsText":""},"isCut":false}
and here is the script:
//Start holding down Command const position = sf.mouse.getPosition().position; sf.keyboard.modifiers({ isOption: true }); sf.mouse.click({ position: position, }); //Release all modifiers sf.keyboard.modifiers();
I hope this helps. Let me know if there is anything else I can do on my end.
Christian Scheuer @chrscheuer2025-02-06 09:19:06.308Z
Hi Phineas,
Please see this video for more details:
https://www.youtube.com/watch?v=suyUCGjwVkAChristian Scheuer @chrscheuer2025-02-06 09:19:21.905Z
cc @Kitch - can help more with direct help.
- In reply tochrscheuer⬆:PPhineas OBrien Milne @Phineas_OBrien_Milne
Hi Christian,
As I stated in my last message, I do use Mouse Click to UI Element for almost all of my click simulations because it gives the modifier options. That doesn't change the fact that isOption isn't working for me at all. Not with script, and not with soundflow "actions". I appreciate that you keep sending more info on that, but that's not really the issue here because I am already aware of this, and even this functionality isn't working. If I'm not making that clear, let me know!Thanks so much for your help,
Phineas O'Brien MilneKitch Membery @Kitch2025-02-06 18:44:45.429Z
Sorry for your frustration. Can you provide me with some more context on what you are trying to option-click?
- Which app are you attempting to automate?
- Which UI element are you trying to option-click? (Can you provide a screenshot of the element).
Hopefully, with this information, I'll be able to troubleshoot the issue further.
Thanks in advance. :-)
- PPhineas OBrien Milne @Phineas_OBrien_Milne
Hi Kitch,
I am trying to automate in Pro Tools. It should be a fairly simple macro/script for deleting all of the clips in the clips list. I am doing combo of key commands to select all the clips, and then clear them. I could click delete with a regular mouse click, and then have to click the "Yes" button to confirm it for every single clip, OR I could alt+click the "Yes" button once to delete all of the clips without having to confirm each one individually. Unfortunately, neither scripts nor the Click relative to UI element are working. I've even just created a basic simple "alt+click" script to try, triggered by a Stream Deck, with no other script other than just executing an alt click. When I do this, I just get a regular click.
Hopefully this helps clear things up as far as what the issue is. I tried updating to the newest soundflow, but this didn't seem to change anything.
Best,
PhineasKitch Membery @Kitch2025-02-07 17:52:45.305Z
Thanks for providing that context.
It looks like you found an edge case that is a little more difficult to automate.
The following script will do what you're after, ie, clear all the selected clips from the clips list.
// Activate Pro Tools Main Window sf.ui.proTools.appActivateMainWindow(); const clipListOptionsPopup = sf.ui.proTools.mainWindow.getFirstWithTitle("Show Options menu"); // Click "Clear..." from the Clips list options popup menu clipListOptionsPopup.popupMenuSelect({ menuPath: ["Clear..."], }); const dlg = sf.ui.proTools.confirmationButtonDialog.invalidate(); // Wait for the first dialog window to appear dlg.elementWaitFor(); const deleteBtn = dlg.buttons.whoseTitle.is("Delete").first; // Click the "Delete" button deleteBtn.elementClick(); // Get reference to yes button (invalidation required) const yesButton = dlg.invalidate().buttons.whoseTitle.is("Yes").first; // Simulate Down Click on the yes button yesButton.mouseClickElement({ clickType: "Down", isOption: true }); // Simulate Up Click on the yes button yesButton.mouseClickElement({ clickType: "Up", isOption: true });
In this edge case, I needed to simulate both a down and up mouse click for the button to accept the Option modifier being held.
I hope that helps.