Useless script: View180

Upside down For reasons that will remain mysterious, I was asked about the possibility of an OS X program or script that would allow you to quickly rotate the contents of any window 180 degrees. I had written some image processing scripts before, but nothing involving screen capture, so I got interested. I came up with this Applescript, View180, which if nothing else is a neat demo of a couple of undeservedly obscure OS X commands, sips and screencapture.

The meat of the script is:

do shell script "screencapture -iWx " & pngFile 
    & ";sips -r 180 " & pngFile 
    & ";open " & pngFile

The options on screencapture there are: “iW” to start in window selection mode (you can press the spacebar to toggle to mouse selection mode), and “x” to keep it from making sound effects.



Share: