Skip to content

Instantly share code, notes, and snippets.

@stevelandeyasana
Created May 15, 2019 21:56
Show Gist options
  • Save stevelandeyasana/6091ddfff4607b86884f38594b733eb5 to your computer and use it in GitHub Desktop.
Save stevelandeyasana/6091ddfff4607b86884f38594b733eb5 to your computer and use it in GitHub Desktop.
AppleScript to toggle between Xcode and Simulator
on alfred_script(q)
tell application "System Events" to set FrontAppName to name of first process where frontmost is true
if FrontAppName is "Xcode" then
tell app "Simulator" to activate
else
tell app "Xcode" to activate
end if
end alfred_script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment