rem CHDK uBASIC script. Shoot when the camera finds focus closer/furtherrem to a reference distance. At startup, camera must be pointed at rem the reference distance or reference can be given as a parameter.remrem To find a value for the reference parameter, use the auto moderem and read what the script reports you. It may or may not berem in millimeters, this depends on your camera model.remrem Works on Digic III, developed on A570IS. rem Change get_prop 206->205 for Digic II.rem Author: Fudgey on 20080529@title Focus Shoot@param a Reference (0=Auto)@default a 0@param b Closer=0, Further=1@default 0if a=0 then gosub "getreference" else R=aclsprint "Ref is", Rprint "READY, SEARCHING FOCUS."if b=1 then goto "further" else goto "closer":closer press "shoot_half" do get_prop 206 P until P=1 get_focus F if F<R then click "shoot_full" else release "shoot_full" do get_prop 206 P until P<>1goto "closer":further press "shoot_half" do get_prop 206 P until P=1 get_focus F if F>R then click "shoot_full" else release "shoot_full" do get_prop 206 P until P<>1goto "further":getreference cls print "Point at reference object," print "press MENU to get reference" do wait_click is_key K "menu" until K=1 press "shoot_half" do get_prop 206 P until P=1 get_focus R release "shoot_half"return
rem CHDK uBASIC script. Shoot when the camera finds focus closer/furtherrem to a reference distance. At startup, camera must be pointed at rem the reference distance or reference can be given as a parameter.remrem To find a value for the reference parameter, use the auto moderem and read what the script reports you. It may or may not berem in millimeters, this depends on your camera model.remrem Developed on A570IS, modified for Digic II, hopefully works.rem Change get_prop 205->206 for Digic III.rem Author: Fudgey on 20080529@title Focus Shoot@param a Reference (0=Auto)@default a 0@param b Closer=0, Further=1@default 0if a=0 then gosub "getreference" else R=aclsprint "Ref is", Rprint "READY, SEARCHING FOCUS."if b=1 then goto "further" else goto "closer":closer press "shoot_half" do get_prop 205 P until P=1 get_focus F if F<R then click "shoot_full" else release "shoot_full" do get_prop 205 P until P<>1goto "closer":further press "shoot_half" do get_prop 205 P until P=1 get_focus F if F>R then click "shoot_full" else release "shoot_full" do get_prop 205 P until P<>1goto "further":getreference cls print "Point at reference object," print "press MENU to get reference" do wait_click is_key K "menu" until K=1 press "shoot_half" do get_prop 205 P until P=1 get_focus R release "shoot_half"return
A_Str8: AFAIK, different cameras may have different values coming out of get_focus... my a570is gives 65535 for infinity, not -1 like yours. But it doesn't matter with my script anyway, you can either specify the reference distance as a parameter or let the script measure it for you automagically.
I converted mm to inchesx5 because it would be a pain to input further distances in mm.
I take pictures of RC airplanes for a website (rcgroups.com). This involves trying to follow a very fast airplane through the sky and taking a snap when it's in the center of the frame and focused. (Infinity doesn't work.) This works about 1 in 100 times if I try to do it manually. It's very frustrating.
Started by bilinsky General Chat
Started by aavzqz Feature Requests
Started by trismarck Script Writing
Started by barianet Script Writing
Started by halfpipe « 1 2 3 4 » Hotwire! Hardware Mods, Accessories and Insights