Created
November 16, 2022 22:04
-
-
Save wisq/df0fac411e12d21667658aeb1829ec7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Record current app so we can switch back to it after. | |
tell application "System Events" | |
set frontmostApplicationName to name of 1st process whose frontmost is true | |
end tell | |
-- Switch to Discord and hit cmd-shift-M. | |
-- This is a built-in keybind and does not require any setup. | |
tell application "Discord" to activate | |
tell application "System Events" | |
keystroke "m" using {command down, shift down} | |
-- Give it some time to register. | |
delay 0.1 | |
end tell | |
-- Return to the previous app. | |
tell application frontmostApplicationName | |
activate | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment