Skip to content

Instantly share code, notes, and snippets.

@dylan-chong
Last active May 1, 2018 00:24
Show Gist options
  • Save dylan-chong/d46544fb86e0a0336b82b50c789037ca to your computer and use it in GitHub Desktop.
Save dylan-chong/d46544fb86e0a0336b82b50c789037ca to your computer and use it in GitHub Desktop.
on run {input, parameters}
global currentProcess
tell application "System Events"
--set currentProcess to the name of the first process where it is frontmost
set currentProcess to (path to frontmost application as text)
end tell
activate application "VirtualBoxVM"
tell application "System Events"
try
-- toggle mic
keystroke "=" using {control down}
on error
key up {{control, shift, option, command}}
end try
end tell
activate application currentProcess
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment