想把整個畫面抓下來存成圖檔,
請問在KDE 下要怎麼做??
thanks~
#!/bin/bash
ID=`xwininfo | grep 'Window id' | awk '{print $4}'`
HDIR=$HOME/Picture/
NOW=`date +%s`
OUTFILE=$HDIR$NOW.xwd
if [ -z $ID ]; then
echo "$0: Error: Can Not Get Window ID."
exit 1
fi
if [ ! -d $HDIR ]; then
echo "Make Directory, $HDIR, For Picture Saving."
mkdir $HDIR
if [ ! "$?" = "0" ]; then
exit 2
fi
fi
xwd -frame -id $ID -out $OUTFILE
echo "Window Capture Is Saved As $OUTFILE."
exit 0
正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客