|
Writing Scripts
Scripts are simply a set of text commands that can be
processed and understood by the camera, resulting in the completion of
an imaging task. So, you can use scripting to simplify complex operations,
saving you time. Automate repetitive tasks. Or use messages displayed
on the LCD to "walk" novice users step-by-step through a task, with little
or no training.
If you're intrigued by this amazing new feature called scripting,
you might want to try your hand at developing one. All you need is a text
editor. And, learning the scripting language is often fairly intuitive
for anyone knowledgeable about programming languages. Here is what a sample
script looks like:
# This script takes pictures as fast as they
can be processed and until the memory card is full (or the script is
aborted).
name "Rapid Fire"
mode 0
declare i:status
declare i:iImageRaw
declare u:IPIP
declare u:uImageTaken, uImageAvail, uStorage
declare b: bSystem, bCapture, bVendor
SetCaptureMode (still)
WaitForShutter ("Press shutter when ready")
uStorage = 1
iImageRaw = -1
IPIP = 0x10000000
PicLoop:
GetStorageStatus (uStorage, uImageTaken, uImageAvail, iImageRaw)
if uImageAvail < 2
DisplayClear()
DisplayLine("Memory is full.")
Wait (5000)
goto Done
end
WaitLoop:
status = 0
GetCameraStatus (bSystem, bCapture, bVendor)
if bSystem & IPIP
Wait (1500)
goto WaitLoop
end
DisplayClear ()
status = 0
StartCapture()
DisplayClear()
DisplayLine("Processing...")
if status != 0
DisplayClear()
Alert ("Got ", status, " for StartCapture!")
end
goto PicLoop
Done: exitscript
If this looks too complex to write, don't worry. There are lots of people
who are developing scripts right now. You can download
free scripts from Kodak or from other
sites on the internet.
If you're interested in writing your own scripts, take the next step and
join the Kodak Developer Relations Group (DRG). You'll receive a Scripting
Software Development Kit (SDK) complete with all the necessary tools to
create and upload customized programs that work with DC220, DC260, DC265, and DC290 Cameras.
|