- Open Shortcut app and create a new shortcut
- Add Run AppleScript
- Copy and Paste the code in this file
- Add a Run with shortcode
- Run the Shortcut
- Open System Settings -> Privacy & Security -> Accessibility
- Enable Shortcuts.app
Please Note: You may need to grant additional Accessiblity permissions depending on the security settings unique to your device