Hi,
I've stumbled on this issue also when learning CHDK scripts.
I haven't tested the CHDK DE update.
The workaround for the AllBest CHDK (build 1324) would be to use set_aflock.
Example1:
@title shoot
rem Lets suppose shoot_half is pressed all the time.
rem (camera uses autofocus only one time)
rem Will the camera skip the autofocus process
rem if shoot_full is clicked / pressed?
rem Yes.
rem Glitch: click "shoot_full" and
rem press/release "shoot_full" will release
rem the shoot_half button also. (unintuitive)
rem Problem: if "shoot_half" is released after
rem taking the first picture, the camera will
rem have to refocus when taking second picture
rem (refocus using either shoot_half or shoot_full).
rem Conclusion: when I take the many pictures
rem => no skipping autofocus for the second
rem and later pictures possible.
rem Solution: set_aflock (see next script).
rem The script:
print "shoot_half will be pressed in 5sec."
sleep 5000
press "shoot_half"
rem The camera catches focus.
sleep 5000
print "shoot_full will be pressed in 5 sec."
sleep 5000
press "shoot_full"
sleep 5000
release "shoot_full"
rem shoot_half button released also. (unintuitive)
print "shoot_full will be pressed in 5 sec."
sleep 5000
rem Camera catches focus again as shoot_half was already
rem (unintentionally) released earlier (unintuitive)
click "shoot_full"
sleep 5000
rem release shoot_half does nothing as shoot_half was already
rem released earlier by 'release "shoot_full"'
release shoot_half
end
Example2: (set_aflock)
@title shoot - aflock
rem I can take multiple pictures without refocusing
rem using shoot_half, set_aflock and shoot_full.
print "shoot_half will be pressed in 5sec."
sleep 5000
press "shoot_half"
rem The camera catches focus.
sleep 3000
release "shoot_half"
rem Lock the focus.
print "---Locking the focus.---"
set_aflock 1
print "shoot_full will be pressed in 5 sec."
sleep 5000
press "shoot_full"
rem shoot_full skips the autofocusing process
rem because of set_aflock. (success)
sleep 5000
release "shoot_full"
print "shoot_full will be pressed in 5 sec."
sleep 5000
click "shoot_full"
sleep 5000
print "---Unlocking the focus.--"
set_aflock 0
print "shoot_full will be pressed in 5 sec."
sleep 5000
click "shoot_full"
rem shoot_full uses autofocusing again, as AutoFocus lock
rem is disabled.
sleep 5000
end
///edit: fixed the code as the 'rem ' sections were too long and the script would hang.
//edit2: tested in Av, M modes (a590), Focus: Macro.