Lock focus in a script - page 3 - Script Writing - CHDK Forum

Lock focus in a script

  • 20 Replies
  • 10489 Views
*

Taponidas

Re: Lock focus in a script
« Reply #20 on: 01 / August / 2011, 15:05:18 »
Advertisements
Ok, it works with aflock! I didn't see that set_aflock(1) make an AF cycle...

I was getting crazy also trying to use the "set_aflock" function. As you say, it seems af_lock performs one autofocus cycle. On my A610, that piece of script doesn't refocus (focus is actually blocked).

set_aflock 1
n=0
while 1
  n=n+1
  press "shoot_half"
  sleep 2000
  get_focus x
  print "Enfoque", n, x, "mm"
  release "shoot_half"
wend

But that other one will always refocus (notice set_aflock is continuous being called and then an AF cycle being performed):

n=0
while 1
  n=n+1
  set_aflock 1
  press "shoot_half"
  sleep 2000
  get_focus x
  print "Enfoque", n, x, "mm"
  release "shoot_half"
wend
« Last Edit: 01 / August / 2011, 15:07:42 by Taponidas »

 

Related Topics


SimplePortal © 2008-2014, SimplePortal