CCDSoft
Cool
Stuff
Let's say you wish to have one
button enable the "Autosave" feature and another disable it.
Well here is
exactly how.
First create a
Visual Basic
Script (or equivalent) that sets the state of AutoSave. Then just assign one of
the Run Script buttons in CCDSoft 5 (press the number 1 key) to the corresponding script. It will
take two buttons one for the "On" script and another for the "Off" script.
There is no ambiguity here.
Using View | Tool Bars | Tool
Bars Setup in
CCDSoft 5 will
allow you enable the
"Run Script" tool bar
as shown below. Then you can
simply press an unassigned button and assign any script to that button for
quick simple easy painless access. The
name of the script is shown on the button. See the following assigned
example
scripts AtFocus, CenterAndTake, autosaveoff, and autosaveon, Take Image and
Map, etc. Being
able to easily invoke scripts this way comes in very handy indeed.
View Tool Bars | Setup

Check Run Script
Press 1 to bring up the
Run Script dialog

Assign the buttons to the scripts you want!
To assign a button to a
script simply press the button then Browse your computer for the Script by
name. See below.
Cool!

Button 4 is now AutoSave-Off
To clear an assignment you
must press CONTROL+SHIFT+Left Mouse button to clear the assignment and ask
for a new one.
From the CCDSoft
help file we get the following example code for accessing the AutoSave
feature externally. And yes it really is this simple!
Option Explicit
Dim Cam
Set Cam = CreateObject("CCDSoft.Camera")
'------------------------------------------------------------
'Put/Get AutoSaveOn property
'------------------------------------------------------------
Cam.AutoSaveOn = 1
'End
The above text is saved as "AutosaveOn.VBS".
And of course the following code saved as "AutoSaveOff.VBS",
Option Explicit
Dim Cam
Set Cam = CreateObject("CCDSoft.Camera")
'------------------------------------------------------------
'Put/Get AutoSaveOn property
'------------------------------------------------------------
Cam.AutoSaveOn = 0
'End
Now that the two scripts are created and
saved they need only be
assigned to the buttons per the above instructions. Again,
this makes enabling the Autosave feature quite simple. Once you are in
the habit of pressing the button AutoSave on you are less likely to forget.
Example 2 Take Image and Map!
What if you want a script that
will take a CCD image then map the center of the image in TPoint. Here is
how. |