screen shot tips


milkshake

Advanced Member
Joined
May 18, 2009
Messages
3,742
Age
37
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:

fusion_power

Advanced Member
Joined
Dec 25, 2005
Messages
13,167
Location
germany
Website
Visit site
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
 

milkshake

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

bzar

A Commando
Joined
Sep 22, 2008
Messages
4,493
Location
Finland
Website
Visit site
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:

milkshake

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

milkshake

Advanced Member
Joined
May 18, 2009
Messages
3,742
Age
37
Location
Rotherham, UK
ok so final script above in the original post, if there are any further improvements that could be made please suggest
 

mcobit

Advanced Member
Joined
Jul 28, 2008
Messages
6,910
Now we just need a way to capture apps, that use nota'z sdl, like pcsx ReARMed, Picodrive etc.
 

bzar

A Commando
Joined
Sep 22, 2008
Messages
4,493
Location
Finland
Website
Visit site
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:

mcobit

Advanced Member
Joined
Jul 28, 2008
Messages
6,910
Nope, but just try it, I think the problem is, that they don't render on the framebuffer.
 

milkshake

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

Farox

Certified Guru
Joined
Jan 8, 2009
Messages
2,180
Age
53
Location
Italy
Website
rbnet.it
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 ;)
 

milkshake

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

Cloudef

Member
Joined
Dec 30, 2009
Messages
460
Location
Gensokyo
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?)
 
Top