Dear script authors and those just learning:
The CHDK Forum has a dedicated Script Writing and uBASIC section. The forum's design and capabilities make it far easier to discuss and help with the sometimes confusing nature of scripts and uBASIC. You are strongly encouraged to post on that forum so that you can get assistance more rapidly and in a much more easy-to-follow discussion format. I hope you can join us there!
For beginners, there is a tutorial: TutorialScratchpad
Final scripts can be linked to this page as a kind of Script Archive. The above mentioned forum is only for those who would like some assistance or input from others with similar goals in mind.
→ See also the Scripting Cross Reference Page for the complete list of CHDK scripting commands for Lua and uBasic.
The scripts that are posted below were written by CHDK users, and are contributed as is.
Please note that prior to 2009 a number of special builds of CHDK were in general release and some used different uBASIC commands and features. With the unification of CHDK into one release trunk, some of these older scripts may not run on current versions of CHDK.
Further, some of these scripts use the get_prop and set_prop commands. This directly modifies particular memory locations that store some camera settings. Different generations of cameras have different property number assignments so be cautious in using any script that uses these commands. Use the get_propset command to be sure which parameter set to use for a particular camera.
- Drivelapse script for recording a time lapse from a moving vehicle. Use this for road trips
- Countdown Intervalometer is an easy to use intervalometer script suitable for the casual user.etc.uBASIC/Scripts: Make ANY Single-Shot Intervalometer into an HDR-Bracketing Script|Make ANY Single-Shot Intervalometer into an HDR-Bracketing Script]] (valuable CHDK usage info, not a script)
- Time lapse script variable shutter speed (prevents camera from taking underexposed shots during timelapse.)
- HDR time lapse (Starts at 300 as default for pictures. Easier to understand in some respects than the Ultra Intervalometer. Someone needs to find a way to combine the 1st and 2nd scripts' user features as the 1st script doesn't show what's going on, rather just shoots. The second script tells you delay for 10 seconds so at least you know you're still taking a shot)
- Unlimited Interval Shooting
- Long Exposure Intervalometer (Its purpose is for NIGHT shots. Takes long exposure shots continuously for applications such as night time time-lapse or to take image stacking shots for astrophotography. IMPORTANT NOTE ABOUT THIS SCRIPT. IT TAKES LONG EXPOSURES, SO DON'T PANIC WHEN YOUR SCREEN GOES BLANK FOR 15 SECONDS. IT'S TAKING A PICTURE.)
- Ultra Intervalometer a simple script without many features beyond precise timing
- OMNI Intervalometer (Use in burst mode with new Tv-bracketing for HDR!) (does not work with Canon s5 IS)
- Acccurate Intervalometer
- Yet Another Accurate Intervalometer
- A Simple Intervalometer (Added 9/28/07)
- A fast "intervalometer" (uses continual mode, so interval duration not under your control)
- My first intervalometer
- Simple bracketing+Intervalometer
- Time Lapse Video Interval Time mod
- Time Lapse Photography -- Shoots continuously with an interval. Uses Fingalo's get_tick_count to
- Increasing Intervals HDR Nightshot Script -- Shoots 7 images with shutter times getting longer each shot.
- Accurate Intervalometer with power-saving and pre-focus
- Battery Intervalometer - demonstrates all know techniques for conserving battery power (Lua)
- How to use CHDK + Custom-Timer settings for all manner of bracketing without a script. (see note at bottom)
- Focus Bracketing v1.1 (deprecated)
- Multipurpose Bracketing
- EV bracketing with TV and AV commands
- Focus Bracketing with set_focus and get_focus
- Fill-Flash Bracketing
- Universal Bracketing
- An ultra fast HDR bracketing script for A6xx (5 bracketed pictures in 5 seconds !!!)
- Symmetry EV bracketing
- G7 HDR Bracketing
- Bracketing and EV correction
- Simple Bracketing for A460
- Scene Bracketing
- Scene Bracketing(lua)
- Motion Detect Plus Script - Takes a series of images that are triggered using motion detection.
- Lightning script -- fudgey (Lightning script which captures quick successions of light bursts.).
- Fast Motion detection (latest version)
- Multipurpose Motion (Sexy script. Could use for monitoring, or even photo shoots for banquets and such.)
- Universal motion detection
- Motion detection with adaptive sensitivity
- Multipurpose Motion Detection
- Zoom Shoot! Zoom takes a shot zooms in with one step takes another shot zooms in and so forth.
- Easy Zoom & MF while Video Recording
- A Property Case Value Tester
- Show which key has been pressed
- Photo Rations
- Led flashlight
- Scripts for Canon A640 (New: now updated for the AllBest build)
Old / Obsolete
- Lightning Photography (Obsolete with CHDK Build #144 and later, see note on script page.)
- Tally-Torch (Funny but obsolete, see new LED commands.)
- Cable Release (Obsolete unless you need a mechanical trip, all new builds have USB remote!)
- Time Bandit 1.0 -- Arman Bohn This timelapse script creates a sequence of jpegs which can be turned into an a video on your PC.
Other Resources / Archives
- Some more scripts that may not appear here at the Wikia archive. Due to the easier method of jointly discussing and working on scripts at the CHDK Forum some new scripts are showing up there that you may not find in any other places. For example: some newer and faster Lightning Photography /Motion Detection scripts have been added (among others).
- CHDK scripts for Canon SD1000/IXUS70 ::An interesting collection of unique scripts, written primarily for the SD1000/IXUS70 camera (DIGIC III), but can easily be converted to most all DIGIC II cameras by following the directions in the simple REM comments in them. Worth checking them out. They use some creative shortcuts that can be applied to your own scripts, or used as-is.
Information for contributors
Please add your debugged and tested scripts to this section. Reserve discussion and help for writing your script to the CHDK Forum: Script Writing (or the now rarely-used discussion section (tab above)). Final scripts will appear on this page.
- Scripts added here should include:
- Camera model that you wrote it on.
- Other camera models that it is known to work on.
- The CHDK build required to run it (if it's an extension beyond GrAnds builds).
- Any special instructions that may be required for running the script.
- Your script!
- Since some scripts require special instructions that might be too lengthy to write into the script itself with "print" statements, I think it would be a good idea to start a common practice of including a short but informative text-file with each script, that could be saved by the same filename. Using a .TXT extension so the file may be referred to as a help-file using CHDK's "File Reader".
- It has been found that some people are irresponsibly/foolishly sharing collections of scripts without the important accompanying documentation for each script. Try to include some extra info in the header of your script in the form of rem statements that might help the unfortunate people that might get hold of undocumented scripts. Beginning of script example:
rem Author: Your Alias/Name rem For S-Series ONLY! rem Requires Fingalo's build v 106 or later! rem Use with caution! Read documentation!
To post your own script to this main Scripts page:
- Click on the EDIT TAB at the top of the page (not the ones beside each entry).
- Scroll to the bottom of the list of scripts.
- Add new line
* [[uBASIC/Scripts: <<YOUR SCRIPT TITLE>>|<<YOUR SCRIPT TITLE>>]]
- to the list.
- Save changes.
- Click on the list item you just added.
- Use the following template to publish your script:
== <<SCRIPT TITLE>> == :'''Written for/on:''' <<CAMERA MODEL>> :'''Also works on:''' <<CAMERA MODELS>> :'''Required CHDK build:''' <<either 'any' or specify the build required>> <<SCRIPT DESCRIPTION>> '''Documentation/Help''' (save as a small "<<script_filename>>.txt" file to your /CHDK/SCRIPTS/ folder) ---- <<HELP TEXT>> ---- '''Script Code''' (save as "<<script_filename>>.bas" to your /CHDK/SCRIPTS/ folder) <pre> <<SCRIPT BODY>> </pre> --~~~ [[Category:Scripts]]