AutoShot: Automatic Screenshot Taker

12:59:00

AutoShot. I couldn't resist naming an elementary AppleScript script. It was too good a name to pass up.

Autoshot automatically takes screenshots of your Mac while you play your game, or work on your project, so you can document your work or play, without having to press the combination of keys to take a screenshot. There are full fledged apps out there that might do this, but this is a simple script that can do the same. You can decide the delay between each screenshot, and for how long should the script take the screenshots.

Here is the code incase you want to edit it anyway. I took bits of code from places, as I'm slightly rusty at this. To change the format of the image, simply edit the ".png" bit.

display dialog "AutoShot: Automatic Screen Capture Script 
Gap between each shot(in seconds)" default answer "" buttons {"OK", "Cancel"} default button 1 --Q&A for user, to determine factors of taking screenshots
set beta to text returned of result
display dialog "Period of time for the screenshots to be taken(in minutes)" default answer "" buttons {"OK"} default button 1
set zeta to text returned of result --period of time for shots to be taken
display dialog "Screenshots will be saved on folder named 'AutoShot' on Desktop" buttons {"OK"} default button 1

set dFolder to "~/Desktop/AutoShot/"

do shell script ("mkdir -p " & dFolder)

set zeta1 to zeta * 60 --converting input to seconds
set alpha to (zeta1 / beta) --calculating no. of times the screenshot code has to be repeated


repeat alpha times --Repeat Code
set tTime to do shell script "date +%H%M%S"
do shell script ("screencapture " & dFolder & tTime & ".png")
delay beta --Gap between each shot
end repeat

The download link for the app that doesn't need AppleScript editor. Its a standalone app, so it'll run the script on simply running the app.

You Might Also Like

0 comments

what do you think?