My intervalometer script w/ optional autofocus - Script Writing - CHDK Forum supplierdeeply

My intervalometer script w/ optional autofocus

  • 2 Replies
  • 3996 Views
My intervalometer script w/ optional autofocus
« on: 21 / June / 2012, 15:01:29 »
Advertisements
Hi all,

I've been meaning to use CHDK for a while but never had the camera to take advantage of it... $37 later on ebay, I have a gently-used A720IS and am using it for timelapse work.  I started with the Ultra Intervalometer script but it didn't meet my needs entirely: mainly, it focuses on every shot.  I modified the Ultra script... and modified it some more... and now it bears little resemblance to the original script.

There is no delay mode in this version of the script, as I didn't personally need it. For my needs I've configured it so that you can set the maximum number of shots by entering a thousands, hundreds as well as regular number value (so 1 in the 1000's, 2 in the hundreds and 78 in the last value would tell the camera to take 1,278 shots in total).  The autofocus value is either 0 or anything else - if it's zero, the camera will focus once at the beginning of the cycle and lock that focus for the rest of its shot count. If it's 1 (or -1, or 78, or anything) it will autofocus for each shot.  The Interval setting should be fairly easy to figure out (setting in minutes, seconds, and tenths of seconds).

What I like about the design of this script is that when it's active, it will show a countdown to the next shot and the progress of shots, in this format: [3/100] (19) where in this case, 19 is the number of seconds until the next photo will be taken.  Like most other intervalometer scripts, after it's taken its final shot, it will shut down.

Code: [Select]
rem Author - Andrew Alexander
@title Andrew's Intervalometer
@param a Autofocus each (0=N, #=Y)
@default a 0
@param m Number of Shots (1000's)
@default m 0
@param c Number of Shots (100's)
@default c 0
@param i Number of Shots (0-99)
@default i 0
@param x Interval (Minutes)
@default x 0
@param y Interval (Seconds)
@default y 10
@param z Interval (10th Seconds)
@default z 0

t=0
w=(x*600+y*10+z)*100
if w<100 then let w=100
d=w/1000

s=(m*1000)+(c*100)+i
if s<1 then let s=0
if s<1 then print "Intv started (inf)" else print "Intv started (",s,")"

if a=0 then goto "setfocus" else goto "delay"
 
:setfocus
press "shoot_half"
print "Setting focus..."
sleep 2500
set_aflock 1
print "Focus locked."
release "shoot_half"
goto "delay"

:interval
t=t+1
click "shoot_full"
if t=s then shut_down

d=w/1000
:delay
cls
print "[";t;"/";s;"] (";d;")"
sleep 1000
d=d-1
if d=0 then goto "interval" else goto "delay"

Re: My intervalometer script w/ optional autofocus
« Reply #1 on: 11 / July / 2015, 10:16:05 »
Is this a .lua or a .bas is script?

Re: My intervalometer script w/ optional autofocus
« Reply #2 on: 11 / July / 2015, 10:54:21 »
.bas
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics