Last active
November 8, 2022 15:55
-
-
Save samuelchanx/a13438163c103e6ad8091fa7988ef23b to your computer and use it in GitHub Desktop.
Put the Android emulator to front on Mac #android #mac
This file contains hidden or 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
| tell application "System Events" | |
| if (get name of every application process) contains "scrcpy" then | |
| -- Support the scrcpy emulator | |
| log "Contains scrcpy" | |
| tell application process "scrcpy" | |
| set frontmost to true | |
| end tell | |
| else | |
| -- Support the system emulator | |
| log "ask emulator to show as frontmost" | |
| tell application "System Events" | |
| tell process "qemu-system-aarch64" | |
| set frontmost to true | |
| end tell | |
| end tell | |
| end if | |
| end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment