- Written for/on: Fingalo's Build only !
- I used my S3 (but should work with all)
WARNING!!!! This is a testing script that allows you to get and set any of the camera "property case values". It does not check for the appropriateness of any of its actions. IT IS NOT KNOWN WHAT THE CONSEQUENCES ARE OF SETTING SOME OF THESE PROPERTIES TO PARTICULAR VALUES. USE IT AT YOUR OWN RISK. IT MAY BE POSSIBLE FOR YOU TO HARM YOUR CAMERA BY USING IT, EVEN IF YOU ARE CAREFUL!!
ITS USE MAY VOID YOUR WARRANTY!!!
PLEASE DON'T USE THIS UNLESS YOU KNOW WHAT YOU ARE DOING!
This is clearly a hackers tool!
(Is that a loud enough disclaimer and warning?)
This script allows you to examine the property case value in your camera. Many of these are unknown. It also allows you to set those values.
I used this script for the results I posted on the script tutorial discussion page. It would be helpful if you discover things to also post them on that page: Talk:UBASIC/TutorialScratchpad#Property_Case_values._A_working_exploration_section
When you run the program, using the left and right buttons will change the particular "property number" that you can view and change. Using the Up and down arrows, you can change the "set" value to some number, and then IF (and only if) you hit the "set" button will you actually change that property to that value.
Hitting the "zoom" key changes the amount by which the "set value" and property number change when you hit a direction key (1,10,50,100, then back to 1 if you hit it one more time). [Update, I changed it so the changer value also includes 96, which is one stop unit on the exposure compensation, so you can more easily set #25 & #26]
If you hit the [menu] button, it will take one picture, and then exit.
I've found that I can run this script, and then hop into and out of CHDK to change something, then hop right back in to see what the effect was.
When you run it, it will print the following:
P 30 = 0 set2= 1 delta= 1 (Z-in alters) [set]= set prop to set2 L/R/up/Dn alter P or set2 [menu]= shoot and exit
The first line indicates that you are examining property #30, and that its value is currently 0, and that *IF* you hit the [SET] button you would set it to 1. In the second line, the "delta" value is currently 1 (and if you hit the zoom button, delta will change to 10, then 50, then 96, then 100, etc), and so by hitting the Up/Dn/L/R arrows you will change the property number or the set value by the amount of the delta value.
Every time you hit a button the screen updates with the current values.
Script Code (save as "propcase.bas" to your /CHDK/SCRIPTS/ folder)
<<SCRIPT BODY>> rem author Divalent. Modification of Fingalo's sample script rem this only works with Fingalo's CHDK build @title propcase @param a propid @default a 30 @param b set value @default b 0 rem variable "c" will be the actual value reported rem b = what you will set it to rem a = the property you want to detect and/or change rem d = variable "delta" amount (can be 1, 10, 50, or 100) d=1 :loop rem print current state of property get_prop a c print "P",a, "=", c,"set2=", b print "delta=", d, "(Z-in alters)" print "[set]= set prop to set2" print "L/R/up/Dn alter P or set2" print "[menu]= shoot and exit" wait_click is_key k "zoom_in" if k=1 then d=d+9 if d=19 then d=50 if d=59 then d=96 if d=105 then d=100 if d=109 then d=1 is_key k "up" if k=1 then b=b+d is_key k "down" if k=1 then b=b-d is_key k "left" if k=1 then a=a-d is_key k "right" if k=1 then a=a+d is_key k "set" if k=1 then set_prop a b is_key k "menu" if k=1 then shoot if k=1 then sleep 1000 if k=1 then goto "lend" goto "loop" :lend end