I need some help figuring out why this macro for Curio goes wrong.
When you delete an asset or page from Curio, it puts up a confirmation dialog. I wanted to be able to dismiss the confirmation by pressing delete a second time.
The dialogs for deleting an asset or page have different labels on the confirmation buttons:
![2023-05-26_14-36-41.532](https://forum.keyboardmaestro.com/uploads/default/original/3X/9/2/92433ea50a7e5835fb63e9137d648c2661da5cf0.png)
![2023-05-26_14-38-01.355](https://forum.keyboardmaestro.com/uploads/default/original/3X/5/2/525045c22a764449e5abb7e399ea98b1b4f3d7e8.png)
Here is the macro:
The macro works as planned, but only when I tap the delete key a second time quickly. If there is even the slightest pause, KM won't click the dialogue button, it just beeps. It's like it doesn't realize that the button exists anymore.
Any ideas how to fix this?
At a guess, the Delete menu item isn't enabled by the time you do the slower second tap -- the macro goes straight to the "Keystroke Delete" action, which is an invalid keystroke when the dialog is up, so the OS beeps its displeasure.
Try setting the first "If..." to "If any of the following are true" and then adding your two "button exists" conditions there, so its true
when the menu item is enabled OR the "Delete to Trash" button exists OR the "Delete From Project" button exists.
1 Like
Thanks very much -- that did the trick!
UPDATE: In case anyone finds this useful, Curio changed the behavior so that the DELETE menu disabled when the dialog box came up.
I ended up having to do multiple IFs to check if text was being edited, and then if neither of the buttons were available, before the IFs to press the appropriate buttons.