[prev in list] [next in list] [prev in thread] [next in thread]
List: mandrake-newbie
Subject: Re: [newbie] taking screenshots / what programs using how much memory
From: Brendan <coolian () mediaone ! net>
Date: 2001-12-01 7:46:58
[Download RAW message or body]
Try this:
#!/bin/bash
wait=5
dir=$HOME
timestring=`date +%Y%m%d`
picname=screenshot$timestring.jpg
display=0
hostname=$HOSTNAME
while [ $# -gt 0 ]; do
if [ $1 = "--wait" ]; then
shift
wait=$1
else if [ $1 = "--dir" ]; then
shift
dir=$1
else if [ $1 = "--picname" ]; then
shift
picname=$1
else if [ $1 = "--display" ]; then
shift
display=$1
else if [ $1 = "--hostname" ]; then
shift
hostname=$1
else
echo "Invalid switch: $1"
echo "Usage: screenshot [--wait <secs>] [--dir <dir>] [--picname <pic>]"
echo " [--display <num>] [--hostname <name>]"
echo "(e.g. screenshot --wait 10 --dir /usr/local/pix)"
exit
fi
fi
fi
fi
fi
shift
done
while [ $wait -gt 0 ]; do
echo "$wait..."
sleep 1
wait=$(($wait - 1))
done
import -window root -display $hostname:$display $dir/$picname &> /dev/null
if [ $? != 0 ]; then
echo "Failed to capture screeen, do you have permission to write to $dir?"
exit
fi
echo "Screen capture successful!"
echo "Written screenshot to $dir/$picname"
exit
["message.footer" (text/plain)]
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic