56

q=n-m

print "Intvl Begins:", q/60; "min", q%60; "sec" sleep 930

next m return

----------------------------------------------------------------------------------------------------------------------------------------------------

http://chdk.wikia.com/wiki/UBASIC/Scripts:_Ultra_Intervalometer___________________________________________________________________________

UBASIC/Scripts: Lightning script -- Fudgey

Written for/on: Powershot S5 ISAlso works on: A540, A550, A590 so far.Doesn't work on: A720 IS and some others.

This is basically a very fast and responsive motion detection script. This will definitely solve your problems if you want to catch lightning, (thus the title) or anything fast, however some objects will blur when the light conditions are insufficient. Enjoy this script!

Script Code (save as "Lightning script.bas" to your /CHDK/SCRIPTS/ folder)

----------------------------------------------------------------------------------------------------------------------------------------------------

rem Author: fudgey - based on BarneyFife's MD Lightning6 and MLuna's Motion Detect scripts

rem Tested on A570IS, Allbest build 16

rem For bursts, set the camera in continuous shooting mode and set j>0

rem If

j>0

in single shot mode, you will see your shot for j seconds on screen.

@title

Fast MD with Burst/Preview 080205

@param

a

Columns

@default

a

6

@param

b

Rows

@default

b

4

@param

c

Threshold (0-255)

@default

c

10

@param

d

Compare Interval (ms)

@default

d

1

@param

e

Trigger Delay (0.1 sec)

@default

e

42

@param

f

Rows to Exclude

@default

f

0

@param

g

Pix-Step(speed/accuracy adj)

@default

g

8

 

@param

h

Reg Mode(0-no,1-incl,2-excl)

@default

h

0

@param

i

Measure Mode (1-Y,0-U,2-V)

@default

i

1

@param

j

Burst/Preview (sec,0=off)

@default

j

0

if a<1

then a=1

if b<1

then b=1

if c<0

then c=0

if g<1

then g=1

if f<1

then f=1

if j<0

then j=0

e=e*100