EasyManua.ls Logo

Canon Camera - Scripting; 5.1 Launching and configuring scripts

Canon Camera
257 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
5.1 Launching and configuring scripts 77
5 Scripting
The ability to control the camera with a script is one of the outstanding
features of the CHDK. With scripting, you can automate almost every pho-
tographic task. You can shoot time series, react to motion, shoot all sorts of
bracketing series for high dynamic range photography ( HDR) or increased
depth of field, and much more. In fact, many users say that camera auto-
mation via scripting has been the main reason they installed the CHDK.
Therefore, we will discuss scripting in detail and also present some sample
scripts
1
from different areas where scripting can be useful.
On the Internet, and in particular on the CHDK website, you will find a
large number of premanufactured scripts—mostly for time series, motion
detection, and bracketing. Many of these scripts have only been tested
with a few camera types. So, before using such a script, try it out and estab-
lish whether it works properly with your camera. In particular, older scripts
written for the DIGIC II cameras need some adaptations to run on DIGIC III
or DIGIC IV cameras, and vice versa. Therefore, even if you do not plan to
write your own scripts, it is worth taking a closer look at CHDK script devel-
opment.
Newer builds of the CHDK support two scripting languages: the simple
uBasic and the more advanced Lua language. The majority of existing
scripts are written in uBasic simply because it’s been supported by the
CHDK since the very first version. Because uBasic is simple, it is well suited
for beginners. Lua, on the other hand, requires some knowledge about
basic concepts of computer programming.
5.1 Launching and configuring scripts
Scripts are stored on the memory card in the folder CHDK/SCRIPTS/ or a
subfolder. To load a script, first switch to the <ALT> mode, then press the
FUNC/SET button
2
. Now the script menu will display. Select Load Script from
File … and press FUNC/SET again. The file browser (section 4.10.1) will be
shown positioned at folder CHDK/SCRIPTS/. Navigate to the script that you
want to load and press
FUNC/SET again. The script is now loaded and can
1 All scripts are found on the book CD.
2 If you had set the option User Menu Enable to OnDirect, you first need to
close the user menu by pressing the MENU button.

Table of Contents

Related product manuals