86
C H A P T E R 5
Scripting
5.3.3 Output
The
command can be used to show information on the camera dis-
play. A
command can have an unlimited number of parameters. Pa-
rameters are separated by commas or by semicolons. During output, the
commas appear as space; the semicolons appear as no space. For example:
print "a:", a;"s"
will produce the output
a: 500s
if the variable
a
has the value of 500. Please note that an output line must
not exceed 25 characters in length.
The command
print_screen
allows capturing the output into a file.
print_screen n
with
n > 0
switches capturing on. All output written with
will go into
file
LOG_n.TXT
in subfolder
CHDK/LOGS/
, too.
n = 0
switches capturing off. For example,
print_screen 5
print "hello"
print_screen 0
print "bye"
will produce a file
LOG_0005.TXT
containing the string “hello”.
Finally, the command
cls
(clear screen)
removes the output produced
with the
command from the display.
5.3.4
Conditional
clauses
Conditional clauses are built with the
if ... then ... else ... endif
construct. For example:
if a < 0 then
b = 3
else
b = 4
endif
Summary of Contents for Camera
Page 1: ......
Page 2: ...The Canon Camera Hackers Manual ...
Page 3: ......
Page 4: ...Berthold Daum The Canon Camera Hackers Manual Teach Your Camera New Tricks ...
Page 19: ...10 CH APTER 2 Cameras and Operating Systems ...
Page 25: ...16 CH APTER 3 ...
Page 85: ...76 CH APTER 4 Teach Your Camera New Tricks ...
Page 213: ...204 CH APTER 6 ...
Page 253: ...244 AP PENDIX ...