milkshake
Advanced Member
ok just in case people found it hard to take screenshots of their apps for the PND or whatever reason.
I thought this bash script might help:
old:
you can run it from the terminal or you can just SSH into your pandora and then run it.
It will take screen shots every 20 seconds so it will allow you to actually play the game without worrying about taking screenshots.
depending on where the bash file is and where you run it, it will save the screenshots in the same directory, but of course you can improve it if you like.
EDIT:
here is the new code which works as tested on the pandora.
Then from the terminal or via SSH just run
I thought this bash script might help:
old:
Code:
#!/bin/bash
COUNTER=0
while true; do
if [[ $(date +%s) =~ (00|20|40) ]] ; then
let COUNTER=COUNTER+1
fbgrab "screen$COUNTER.png"
echo "screen$COUNTER.png"
sleep 1
fi
done
you can run it from the terminal or you can just SSH into your pandora and then run it.
It will take screen shots every 20 seconds so it will allow you to actually play the game without worrying about taking screenshots.
depending on where the bash file is and where you run it, it will save the screenshots in the same directory, but of course you can improve it if you like.
EDIT:
here is the new code which works as tested on the pandora.
Code:
#!/bin/bash
HOW_MANY=$1 #how many screengrabs you would like to do before the script is terminated
DELAY=$2 #delay in seconds before each screengrab is generated
i="0" #declair our loop var
FAIL="0" #declair our fail var
if [[ ! $HOW_MANY = [[:digit:]]* ]] ; then
echo "argument 1 should be numerical only!"
FAIL="1"
fi
if [[ ! $DELAY = [[:digit:]]* ]] ; then
echo "argument 2 should be numerical only!"
FAIL="1"
fi
if [ "$FAIL" -eq "1" ]; then
exit
fi
while [ ! $i -eq "$HOW_MANY" ]; do
sleep $DELAY
let i=i+1
fbgrab "screen$i.png"
echo "screen$i.png generated."
done
echo "finished!"
exit
Then from the terminal or via SSH just run
Code:
$>bash script.sh 5 20
Last edited by a moderator: