1 #!/bin/bash
2 ######################################################################
3 # Copyright (C) 2004. Kurt Schwehr
4 # Released under the GPL
5 #
6 # Small script to periodically grab frames from an iSight
7 # http://www.mulle-kybernetik.com/software/MulleSight/
8 #
9 # NOTE: this version is completely lacking in any error checking!
10 #
11 ######################################################################
12
13
14 # First make sure MulleSight is running
15 open /Applications/MulleSight-1.0.9/MulleSight.app
16
17 sleep 2
18
19 declare -i fileNum=$3
20
21 result=0
22 echo "Starting..."
23 while [ "0" == $result ]; do
24 echo $fileNum
25 fileName=`printf "%05d.png" $fileNum`
26 osascript /Applications/MulleSight-1.0.9/MulleSightAsWebcam.applescript
27 echo convert /tmp/picture.tiff $fileName
28 convert /tmp/picture.tiff $fileName
29 fileNum=$[fileNum+1]
30 sleep 2
31 done
syntax highlighted by Code2HTML, v. 0.9.1