Created
October 9, 2022 04:45
-
-
Save dreness/297c627c7ae7d0150669a73345b4c898 to your computer and use it in GitHub Desktop.
This is about as close as I can get to opening an app in the background from AppleScript.
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
-- can't get `open -g` to work... | |
tell application "System Events" | |
set prevApp to name of first process whose frontmost is true | |
end tell | |
tell application "mpv" to launch | |
tell application prevApp to activate | |
tell application "mpv" | |
open "thing_to_open" | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment