⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 monitor_room

📁 WWWcam 是一个从基于视频设备的Webcam中抓图
💻
字号:
#!/usr/bin/perl# this program tells you if there was activity in your room in the# time you started and ended it. (CTRL-C or kill)# You can change say to print if you have no command "say" for computer speech.sub end {	my $signame = shift;	if ( time() - $firsttime > 10  && $firsttime != 0) {	# ALARM	`say "ALARM. Bewegung im Zimmer"`;	}	else {	# nix passiert	`say "Keine Bewegung im Zimmer"`;	}	die "bye...\n";}$SIG{INT} = 'end';$SIG{TERM} = 'end';$firsttime = 0;`say "Zimmer黚erwachung startet in"`;for ($u = 10; $u>0; $u--) {	`say "$u"`;	sleep (1);}`say "Zimmer黚erwachung aktiv"`;open(COUNTFILE, "/tmp/wwwcam.count.0");$frame = <COUNTFILE>;close(COUNTFILE);while ($firsttime == 0) {	open(COUNTFILE, "/tmp/wwwcam.count.0");	$frame2 = <COUNTFILE>;	close(COUNTFILE);	if ( $frame2 - $frame > 0) {		$firsttime = time();	}	sleep(1);}while (1) {  sleep(9999999);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -