Flatbed Scanner Time-Lapse Automation

Hi Everyone!

I’d like to have my flatbed scanner take a full-glass scan every 10 minutes or so and save the images sequentially into a folder. The goal is to create a time-lapse video of the objects on the glass. I’ve been trying to do this manually, but I can’t time the scans at regular enough intervals and I don’t want to have to sit at my computer for days on end.

I’m new to scripting/automation and don’t really know which path to take–or even if this is possible. I have a CanoScan 8800f scanner, running the latest version of OS X. I need to be able to set the image resolution captured by the scanner, but that’s all.

Any help is appreciated. Maybe someone has done this already, but I’m having a hard time searching for this, since scanner automation is a common phrase describing the automatic saving or printing of scanned images (rather than the automatic capturing of images).


Model: iMac
Browser: Firefox 3.6.10
Operating System: Mac OS X (10.6)

I did something a little similar the other day, I was scanning in a whole book and used speech recognition as a scan trigger. What i did was use preview’s scanning function and it just made a bunch of images which I could save all at once at the end. Or not.

set loop to 10 --SET this to the number of images you want.
set delTime to 10 --SET this to the delay between each scan.
set winTitle to "Import from CanoScan 8800f" --SET this to the name of the scan window.

repeat loop times
	tell application "System Events"
		tell process "Preview"
			delay 0.1
			click button "Scan" of group 1 of window winTitle
		end tell
	end tell
	delay delTime
end repeat

Change the 1st 3 variables and this should work. The clicking of a button is almost instant and so the script will start it’s timer for the next scan as soon as the scan starts.

Your script works great. Nice work!