Easy way to modify existing scripts to override flaky mode switch? - Script Writing - CHDK Forum supplierdeeply

Easy way to modify existing scripts to override flaky mode switch?

  • 2 Replies
  • 2906 Views
Advertisements
Hello all.  New to the forum but been happily using CHDK for a couple of years now!  I'm a big fan of the UltraIntervalometer script, and I've been using it for both timelapse shooting and to automatically shoot images from an ultra-light kite photography rig.

Unfortunately, both of my Cannons (SD450 and SD600) are now exhibiting flaky behavior of the mode switch when in still-shot mode.  Playback mode is selected reliably, but still mode tends to "drop" down into video mode.  If I don't catch it, I'll end up shooting a series of timelapse "movies" instead of individual shots, and this really messes up my shot-to-memory card calculations, etc.

With a little searching I get the idea there's a way to set the Capture mode somehow, but not being script-literate I'm not sure how to go about augmenting an existing script.  What I'd really like to do is just to modify a script like Ultra Intervalometer to just override the capture mode to force still mode right off the bat.   Could I just add the right command to the top of that script?

Please accept my sincere thanks to everyone in this community who made such a cool project happen.

*

Offline reyalp

  • ******
  • 14080
Re: Easy way to modify existing scripts to override flaky mode switch?
« Reply #1 on: 27 / March / 2012, 22:53:28 »
Yes, you can override capture mode in script. See http://chdk.wikia.com/wiki/Script_commands#set_capture_mode.28modenum.29

In ubasic, you have to know the number of the mode you want to set. They are numbered starting at one in the list here: http://trac.assembla.com/chdk/browser/trunk/include/modelist.h

so to use P mode, you'd do
set_capture_mode 2

Putting it at the top of the script (after the @ lines) should be OK, as long as the switch doesn't randomly change while the script is running. If it does, you could probably call set_capture_mode before each shot, but it might throw of the timing.
Don't forget what the H stands for.

Re: Easy way to modify existing scripts to override flaky mode switch?
« Reply #2 on: 27 / March / 2012, 23:03:03 »
Perfect, that should work fine.  Since the switch only seems to flake when I try to set it to still mode (doesn't want to stay "up", I guess), I think I'll be fine if I just leave it in video mode and just run the script.

Thanks again for the help, I'll give it a whirl this week.

 

Related Topics