Skip to content

Instantly share code, notes, and snippets.

@samuelchanx
Last active November 8, 2022 15:55
Show Gist options
  • Select an option

  • Save samuelchanx/a13438163c103e6ad8091fa7988ef23b to your computer and use it in GitHub Desktop.

Select an option

Save samuelchanx/a13438163c103e6ad8091fa7988ef23b to your computer and use it in GitHub Desktop.
Put the Android emulator to front on Mac #android #mac
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