screen shot tips


milkshake

Advanced Member
Joined
May 18, 2009
Messages
3,748
Age
39
Location
Rotherham, UK
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:

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:
I only need something that makes Screenshots with a button combo. ^^ If the Pandora would have a print key I even wouldn't need a Screenshot script, at least not for single shots over the clipboard.


Maybe these scripts could be included in the next hotfix, I imagine a settings option where you can set up the button combo or the time for auto screenshots and all this stuff. Yes, I like doing settings with the GUI instead of using the Terminal. :D
 
I only need something that makes Screenshots with a button combo. ^^ If the Pandora would have a print key I even wouldn't need a Screenshot script, at least not for single shots over the clipboard.


Maybe these scripts could be included in the next hotfix, I imagine a settings option where you can set up the button combo or the time for auto screenshots and all this stuff. Yes, I like doing settings with the GUI instead of using the Terminal. :D
There is a way of setting this up with a keyboard short-cut check the pandorawiki for a how to, however I have discovered that the way games handle the controls it stops the shortcut from working once the games have loaded.

Why are you busy-looping for 19 seconds each interval?
If you have a better idea please let us know so I can improve the script
 
Last edited by a moderator:
Just "sleep 20"?


EDIT: Or do you need it to take the screenshots at exactly xx:00, xx:20 and xx:40?
 
Last edited by a moderator:
ok I havent tested it but how about this



Code:
#!/bin/bash


HOW_MANY=$1

DELAY=$2

i="0"


while true; do


	if [ ! $i -eq "$HOW_MANY" ] ; then


		let i=i+1

                fbgrab "screen$i.png"

		echo "screen$i.png"

		sleep $DELAY


	fi


done

Then from the terminal just run



Code:
$>script.sh 5 20
 
Last edited by a moderator:
ok so final script above in the original post, if there are any further improvements that could be made please suggest
 
Now we just need a way to capture apps, that use nota'z sdl, like pcsx ReARMed, Picodrive etc.
 
Code:
#!/bin/bash


HOW_MANY=$1

DELAY=$2

i="0"


while [ ! $i -eq "$HOW_MANY" ]; do

	let i=i+1

	fbgrab "screen$i.png"

	echo "screen$i.png"

	sleep $DELAY

done


Now it quits after hitting the limit. Use -1 in HOW_MANY to capture until interrupted.
 
Last edited by a moderator:
Nope, but just try it, I think the problem is, that they don't render on the framebuffer.
 
also to check to make sure the arguments passed are numerical I have added this too



Code:
if [[ ! $HOW_MANY = [[:digit:]]* ]] ; then

	echo "argument 1 should be numerical only!"

	exit

fi


if [[ ! $DELAY = [[:digit:]]* ]] ; then

	echo "argument 2 should be numerical only!"

	exit

fi
 
Thanks a lot for this script...very usefull


A little tip for a scripts newbe like me..change comment style from // to # like this...



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


or it won't work ;)
 
Thanks a lot for this script...very usefull


A little tip for a scripts newbe like me..change comment style from // to # like this...



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


or it won't work ;)

Lol thanks for that, I have edited my original post to include the hash gates instead.


Glad you find the script useful :)
 
I only need something that makes Screenshots with a button combo. ^^ If the Pandora would have a print key I even wouldn't need a Screenshot script, at least not for single shots over the clipboard.


Maybe these scripts could be included in the next hotfix, I imagine a settings option where you can set up the button combo or the time for auto screenshots and all this stuff. Yes, I like doing settings with the GUI instead of using the Terminal. :D
There is a way of setting this up with a keyboard short-cut check the pandorawiki for a how to, however I have discovered that the way games handle the controls it stops the shortcut from working once the games have loaded.

It's not because "how the game handles the controls", it's because it's a true "fullscreen" window that skips window manager all together.


If games did the fake fullscreen window as many PC games do (maximized window without border) then the window manager key shortcuts would work.


You can however do these shortcuts on lower level than window manager by creating a pandora specific input driver perhaps. (Does pandora button work while in fullscreen game?)
 
Back
Top