Scripting

Scripting is supported beginning with version 1.0.565.

The script editor can be activated from Menu->Script editor. If you have a camera connected to digiCamControl then a simple code completion system will help in script writing. This scripting system no longer is improved, it is indicated to use more flexible Tcl Scripting

Here's a simple script example. All it does is take a picture:

<?xml version="1.0" encoding="UTF-8"?>
<dccscript> 
  <commands>
     <capture/>
  </commands>
</dccscript>

A more complicated one: it captures photos 10 times and waits 5 seconds between each capture:

<?xml version="1.0" encoding="UTF-8"?>
<dccscript> 
  <commands>
     <loop loopcount="10">
         <capture/>
         <wait time="5"/>
     </loop>
  </commands>
</dccscript>

Supported commands

bulbcapture

Special command to tigger bulb capture. This command can be used only in manual mode and the camera shutter in Bulb mode. <bulbcapture capturetime="10" iso="100"/>

capture

Trigger camera photo capture No parameters used <capture/>

echo

Write a text to the script output. Useful when debugging a script. Parameters : text - the text which should be write to script output <echo text="message"/>

if

Set a condition when to execute a script section

<if condition="${camera.mode}!=M">
    <alert text="Set camera in M mode"/>
</if>

loop

Execute a script section a specified number of times For current loop number the ${loopno} variable can be used Ex. capture 100 photos and wait 5 seconds between shots

<loop loopcount="100">
   <capture/>
   <wait time="5"/>
</loop>

PHDGuiding Special command to comunicate with PhD Guiding application. <phdguiding movetype="move 1"/>

setvariable Set a value for a script variable. Session variables can be referenced in the current session. Ex. reset session image counter: <setvariable name="session.counter" value="0"/>

setcamera Set a value for a camera property Ex. set connected camera ISO to 200 <setcamera property="iso" value="200"/>

stop Stop the script execution

wait Halt the script execution for a specified number of seconds <wait time="5"/> <wait time="5" for="camera"/> - wait 5 sec. or until the current camera will be ready

Special variables ${session. - to access current session elements $(camera. - to access current selected camera properties, is read only to set camera properties use <setcamera ${time} - curent time in HH:mm format ${timelong} - curent time in HH:mm :SS format ${day} - current day ${cameraccount} - current connected camera count