Last active
November 8, 2016 23:36
-
-
Save prafulfillment/5d02ab64d5b907786aea to your computer and use it in GitHub Desktop.
Follow instructions here: http://blog.fosketts.net/2010/08/09/assign-keyboard-shortcut-applescript-automator-service/
This file contains hidden or 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 filePath to (path to desktop as text) & "screencast.mov" | |
tell application "QuickTime Player" | |
activate | |
set tdoc to new screen recording --> document "Screen Recording" | |
delay 1 | |
tell application "System Events" to key code 49 | |
delay 2 | |
repeat while exists tdoc | |
delay 1 | |
end repeat | |
-- the recording is stopped | |
open for access file filePath | |
close access file filePath | |
export (first document) in filePath using settings preset "1080p" | |
delay 10 | |
close (first document) without saving | |
quit | |
end tell | |
set user to do shell script "/bin/bash -c '/usr/local/bin/ffmpeg -i ~/Desktop/screencast.mov -pix_fmt rgb24 -r 10 -y -f gif ~/Desktop/screencast-`date +\"%Y-%m-%d_%H:%M\"`.gif'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment