Shortcuts question: Dismiss Siri Programatically?

After triggering a Shortcut with a voice command, I'd like Siri's window to be automatically closed from within the Shortcut. I've tried this native action, with no luck:

Screenshot

I've tried simulating the Escape key via AppleScript; again, no dice:

Screenshot


Edit: Keyboard Maestro to the rescue: a macro called via a URL at the end of the Shortcut, which hits Escape if a Notification Centre window exists:

Screenshot

This works, but it seems a bit silly not to be able to do it from within Shortcuts, which is, after all, an automation app.

1 Like