Skip to content

Instantly share code, notes, and snippets.

@montehurd
Last active May 7, 2020 02:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save montehurd/c61a368a9c2a3ce693a3 to your computer and use it in GitHub Desktop.
Save montehurd/c61a368a9c2a3ce693a3 to your computer and use it in GitHub Desktop.
iOS Simulator Automator AppleScript
on run {input, parameters}
tell application "Safari"
activate
end tell
delay 0.25
tell application "System Events"
key down control
key code 120
key up control
delay 0.1
keystroke "Develop"
keystroke return
keystroke "iOS Simulator"
keystroke return
keystroke "index.html"
keystroke return
delay 0.5
keystroke "c" using {command down, shift down}
end tell
return input
end run
@montehurd
Copy link
Author

  • Open Automator
  • Select New Service
  • Set Send receives to no input
  • Paste the script into Run AppleScript box
  • File Save to save workflow file to ~/Library/Services/
  • System Preferences > Keyboard > Shortcuts > Services then scroll to bottom of list to assign keyboard shortcut to service just created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment