Wikia

CHDK Wiki

UBASIC/Scripts: Simple Bracketing for A460

Talk0
575pages on
this wiki

< UBASIC

Revision as of 22:51, June 4, 2008 by 190.156.52.189 (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Simple Bracketing for A460 Edit

AUTHOR'S NOTE: This is my first script, hope it works for you.


Written for/on: Powershot A460, CHDK Build allbest #50.

Also works on: (unknown at this time)

I wrote this script because i've tried some bracketing scripts, but neither worked for me. Also i've tried to use get_prop and set_prop functions, without any result. And at last, this was the first time on mi life i've tried to use uBasic (at 3 am). If it could be optimized, just tell me.

Documentation/Help (save as a small "focus-brkt.txt" file to your /CHDK/SCRIPTS/ folder)


Before running the script, make sure the exposure value is on 0 and the cursor is on the normal/supermacro selection mode (that's because i based it on click functions).


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

@title Bracketing460
@param a Number of pics-Total: a*2+1
@default a 2
@param b Step (1,2,3)/3
@default b 1

rem set the vars onto the limits
if a<1 then let a=1
if a>3 then let a=3
if b<1 then let b=1
if b>3 then let b=3

sleep 100

print "Preparing..."

rem takes us to the exposure selector
gosub "rut1"

rem as i dont have any idea on how to calculate this, i'll evaluate one by one.
rem it should step to the appropiate value.

if a=1 then if b=1 then gosub "unclick"
if a=1 then if b=2 then gosub "dosclick"
if a=1 then if b=3 then gosub "tresclick"

if a=2 then if b=1 then gosub "tresclick"
if a=2 then if b=2 then gosub "cuatroclick"
if a=2 then if b=3 then gosub "seisclick"

if a=3 then if b=1 then gosub "tresclick"
if a=3 then if b=2 then gosub "seisclick"


rem after setting the appropiate value, returns to the menu
click "set"
sleep 200

rem takes the pic
print "Shoot 1 of", a*2+1
shoot
sleep 400
for s=2 to a*2+1
	rem first enters the menu, then steps right
	click "set"
	sleep 200
	
	if b=1 then gosub "unclack"
	if b=2 then gosub "dosclack"
	if b=3 then gosub "tresclack"
	
	rem Exits the menu
	click "set"
	sleep 200
	
	rem Photo
    print "Shoot", s, "of", a*2+1
    shoot
	sleep 400
next s

rem here we should set the return to default EV, but fuckoff. I'm lazy.

end

:unclick
  click "left"
  sleep 200
  return

:dosclick
  gosub "unclick"
  gosub "unclick"
  return

:tresclick
  gosub "dosclick"
  gosub "unclick"
  return
  
:cuatroclick
  gosub "dosclick"
  gosub "dosclick"
  return
  
:cincoclick
  gosub "dosclick"
  gosub "dosclick"
  godub "unclick"
  return
  
:unclack
  click "right"
  sleep 200
  return

:dosclack
  gosub "unclack"
  gosub "unclack"
  return

:tresclack
  gosub "dosclack"
  gosub "unclack"
  return
  
:rut1
  click "set"
  sleep 200
  click "down"
  sleep 200
  return

Around Wikia's network

Random Wiki