Last active
May 27, 2019 05:17
-
-
Save pwc3/e611504878fd3e18ce91 to your computer and use it in GitHub Desktop.
This file contains 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
set theProcessName to "iOS Simulator" | |
set theWindowNumber to 1 | |
tell application "System Events" | |
tell process theProcessName | |
activate | |
tell window theWindowNumber | |
set thePosition to position | |
set theSize to size | |
end tell | |
end tell | |
end tell | |
tell application "QuickTime Player" | |
activate | |
new screen recording | |
delay 1 | |
tell application "System Events" to key code 49 | |
delay 1 | |
do shell script "~/bin/clickdrag -x " & (item 1 of thePosition) & " -y " & (item 2 of thePosition) & " -dx " & (item 1 of theSize) & " -dy " & (item 2 of theSize) | |
end tell | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this @pwc3
I've made two changes to get this working for me today (April 2018):
.swift
to theclickdrag
filename:~/bin/clickdrag.swift
.Here's my Start Screen Recording.scpt file: