The scripts 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.
Also, be aware that some of these scripts use CHDK's ability to simulate camera button presses. As the buttons on any camera model typically vary from what is found on other camera models, the button press sequence scripted needs to be verified as correct for your camera.
Finally, some of these scripts use the get_prop and set_prop commands. These directly read or write particular memory locations that store some camera settings. Different cameras generations have different property number assignments, so be careful when using any script with these commands. Use the get_propset command to be sure which parameter set to use for a particular camera.
- Time Lapse Script One - accurate intervalometer with display off plus focus & exposure lock (requires CHDK 1.3.0 or better)
- A Simple Intervalometer - like it says - "simple"
- Selective Intervalometer - fine granular control of time of day and day of week shooting
- Ultra Intervalometer - several simple intervalometer scripts with different features
- Fast Shooter Intervalometer - "fastest" shooting without using camera's continuous mode
- A fast "intervalometer" - uses camera's continous shot mode - interval duration not under your control
- Time Lapse Photography -- shoots continuously with an interval.
- Ultimate Intervalometer - script for taking time lapse photos over weeks or months
- Raw Meter Intervalometer - Fast, accurate intervalometer with raw exposure metering and flexible exposure control
- Countdown Intervalometer is an easy to use intervalometer script suitable for the casual user.
- Accurate Intervalometer 1 uses the get_tick_count function to accurately time intervals
- Accurate Intervalometer 2 a regular intervalometer with power-saving and pre-focus
- Yet Another Accurate Intervalometer uses the change in exposure count for faster shooting
- OMNI Intervalometer combines video & regular shooting
Special Purpose IntervalometersEdit
- Autoexposure Intervalometer
- Drivelapse : script for recording a time lapse from a moving vehicle. Use this for road trips
- Carlapse : older scripts for shooting timelapse from a car
- Battery Intervalometer : demonstrates all know techniques for conserving battery power (Lua)
- Meteor Intervalometer : night sky photography with dark frame subtraction management
- HDRLapse : HDR time lapse script
- Fixed Exposure Intervalometer : astrophotography oriented script for long exposures with fixed exposure
- HDR time lapse
- Unlimited Interval Shooting
- Long Exposure Intervalometer a script for NIGHT shots.
- My first intervalometer
- Simple bracketing+Intervalometer
- Time Lapse Video Interval Time mod
- Increasing Intervals HDR Nightshot Script -- shoots 7 images with shutter times getting longer each shot.
- Sunset4 & Sunset5
- SunsetF16 - 1.01 version of this script is camera independent and works with current releases of CHDK
- YASS v4 - Yet Another Sunset Script - works with all cameras
- Timefocus.bas : a Shutter & Focus Stacking Script
- Shutter Speed Stack
- Multipurpose Bracketing
- EV bracketing with TV and AV commands
- 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)
plus >> Bracketing without a script.
KAP & UAV Edit
- Kite & UAV Photography : a fancy intervalometer with advanced exposure control and USB interface for kite and uav photography
- Ultra HDR Script
- ND Filter HDR Script
- HDR Fast Shooter
- HDR with stacking
- HDR time lapse
- HDRlapse.lua Universal HDR intervalometer with fast shooting
- HDR for G7
Focus & DOF Stacking Edit
- Technical Aspects of Stacking Macro Images
- fabri22's Focus Stacking Script
- DOF-based focus stack script NOT based on CHDK DOF Calculations
- Focus Bracketing with set_focus and get_focus
- Macro DOFstacker
- Yet another DOF stacker
- Focus Bracketing v1.1 (deprecated - uses manual focus button pushes)
- Timefocus.bas : a Shutter & Focus Stacking Script
Motion Detection Edit
- Motion Detection Wiki Page
- Motion Detect Plus Script - Takes a series of images that are triggered using motion detection.
- MDFB2013.lua - updated version of fudgey's MDFB script (see below)
- MDFB-080914.BAS - fudgey's Fast Motion Detection (best script for lightning)
- MDFB-0802054.BAS - fudgey's original lightning script
- 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
- Birding with CHDK - tips on bird pictures and a script for video when motion present - very useful for bird pictures
- Zoom Shoot! takes a shot zooms in with one step takes another shot zooms in and so forth.
- Continuous Video Scripts - automatic restart of video recording after Canon time limit reached
- Easy Zoom & MF while Video Recording - keyboard control of zoom and focus setting while recording
- Manual Exposure Control for Video Recording - manual override of Tv, Av, & Sv while recording
- CHDKplus : a script that provide full manual exposure control via an on screen GUI interface
- Sunrise & Sunset Time Calculation Script
- Photobooth - a CHDK powered motion-detection-triggered photobooth.
- A Property Case Value Tester
- Show which key has been pressed
- Photo Rations
- LED flashlight
- TagMe a Lua script that shows how to write to a JPG's EXIF UserComment tag
- RAW development - some functions and an example script for processing RAW images in the camera
- Continuous Autoexposure : Raw meter based auto exposure for continuous shooting
Old / Obsolete Edit
- 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.
- Scripts for Canon A640
Lua Script LibrariesEdit
Other Resources / Archives Edit
- CHDK Forum > Script Writing > Completed and Working Scripts: 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.
Suggestions for contributorsEdit
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. See also the Scripting Cross Reference Page for the complete list of CHDK scripting commands for Lua and uBasic as well as many links to other scripting reference pages.
Please feel free to link your debugged and tested scripts to this wiki page. Reserve discussion and help for writing your script to the CHDK Forum: Script Writing .
- Script pages linked 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, it is a good practice to include a short but informative text-file with each script, that could be saved by the same filename but 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!
Suggestions on posting your own script to your 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]]