For very close Macro work like the SX20 is capable to achieve...meaning that the object is only 1 or 2 centimeters away from the front of the lens, I have found that I need to lower the value to about 10 or 15. Having said that, if I were to photograph something much farther (like I was trying to do in my first test shots) it seems that this is when the Steps need to be higher.
I changed the script to incorporate your observations. Instead of the "Step" parameter being the "amount" to change each time, I changed the "Step" parameter to be the "amount times 5" to change each time. Should make it easier to change step values - the Step parameter would be "2 or 3" for macro and "7 or 8" for routine photos.
I also incorporated a safety check in case the user sets the "Step" parameter less than 1.
rem Author SkyWalker9
@title ZmFocus
@param b Step size [x5]
@default b 8
if b<1 then b=1
b=b*5
sleep 500
get_focus f
print "focus: ", f
print "Zoom IN or OUT"
sleep 1000
press "shoot_half"
:loop
wait_click
is_key k "zoom_in"
if k=1 then gosub "zoom_in"
is_key k "zoom_out"
if k=1 then gosub "zoom_out"
goto "loop"
:unknown
print "Zoom IN or OUT"
return
:zoom_in
f=f+b
set_focus f
print "focus: ", f
return
:zoom_out
f=f-b
set_focus f
print "focus: ", f
return
sleep 1000
release "shoot_half"
:end
end
You are the man! Thanks a million. CHDK community is super and very helpful. I DO appreciate everything you have done for me here more than you can even think.