CLI video capture for iOS: the applescript uses the clickdrag tool to select the given window.
- To start recording Simulator: osascript videocapture.scpt start Simulator 1 /Users/username/bin/clickdrag
- To stop recording and save movie: osascript videoccapture.scpt stop /Users/username/Movies/somename
- To stop recording without saving movie: osascript videocapture.scpt stop
Used by https://gist.github.com/sleekweasel/227315961b0b102e82d9 for automatic recording of test execution in cucumber.
Probably, if I renamed 'videocapture.scpt' to 'videocapture.applescript' and put a #!env osascript line at the start, it would be better.