Script API


This information is for an old version

This page contains information about Smart Shooter 3, which is an older version of the app. Smart Shooter 4 is now available to download and try!

The following table shows the TCL functions that are provided by Smart Shooter 3. Each function is explained in more detail in the sections below.

Function Description
SmartShooter TakePhoto Tells the camera to take a photo
SmartShooter BulbExposure <milliseconds> Tells the camera to take a photo with timed exposure
SmartShooter MultiShot Tells all connected cameras to take a photo
SmartShooter MoveFocus <distance> Moves the lens focus by the specified distance
SmartShooter AutoFocus Tells the camera to auto focus
SmartShooter Set <property> <value> Set the property to the specified value
SmartShooter Get <property> Gets the current value of the specified property
SmartShooter GetList <property> Returns a list of valid values for the specified property.
SmartShooter DetectCameras Tells Smart Shooter to check for newly connected cameras
SmartShooter Connect Connect to the active camera
SmartShooter Disconnect Disconnect from the active camera
SmartShooter Download Download the active photo
SmartShooter DownloadAll Downloads all photos
SmartShooter EnableLiveview Turn on Liveview
SmartShooter DisableLiveview Turn off Liveview
SmartShooter EnableDOF Turn on Liveview DOF preview
SmartShooter DisableDOF Turn off Liveview DOF preview
SmartShooter EnableVideo Turn on video recording
SmartShooter DisableVideo Turn off video recording
SmartShooter EnableLiveviewRecording Turn on recording of Liveview frames
SmartShooter DisableLiveviewRecording Turn off recording Liveview frames
SmartShooter EnableMultiMode Send commands to all cameras
SmartShooter DisableMultiMode Send commands to active camera only
SmartShooter GetNumPhotos Returns the number of photos that have been taken
SmartShooter GetNumCameras Returns the number of cameras that have been detected
SmartShooter SetActivePhoto <index> Set the currently active photo
SmartShooter SetActiveCamera <index|name> Set the currently active camera
SmartShooter GetActivePhoto Get the currently active photo
SmartShooter GetActiveCamera Get the currently active camera
SmartShooter GetPhotoName Get the filename of the current photo
SmartShooter GetCameraName camera
SmartShooter GetCameraMake Get the make of the current camera
SmartShooter GetPhotoDetails Get full details of the current photo
SmartShooter GetCameraDetails Get full details of the current camera
SmartShooter CheckStatus Checks the status of the Smart Shooter application
SmartShooter Wait <duration> <units> Wait for a specified amount of time
SmartShooter WaitUntil <time> <units> Wait until a specified time has been reached

TakePhoto

SmartShooter TakePhoto

Takes a photo using the current camera. This function waits until the photo has been taken. If the photo attempt fails it returns 0, otherwise it returns 1.

BulbExposure

SmartShooter BulbExposure <milliseconds>

Takes a photo with a timed exposure using bulb shooting mode. The camera must already have bulb shooting mode activated through the shutter speed setting. The milliseconds parameter specifies the time in milliseconds to expose the photo. This function waits until the photo has been taken. If the photo attempt fails it returns 0, otherwise it returns 1.

MultiShot

SmartShooter MultiShot

Takes a photo using all currently connected cameras. This function waits until all the photos have been taken. If a photo attempt fails it returns 0, otherwise it returns 1.

MoveFocus

SmartShooter MoveFocus <distance>

Moves the focus distance of the lens. This only works when Liveview is enabled. The distance parameter takes the following values:

  • 1 = Move focus closer by the smallest possible amount
  • 2 = Move focus closer
  • 3 = Move focus closer by the largest possible amount
  • -1 = Move focus farther away by the smallest possible amount
  • -2 = Move focus farther away
  • -3 = Move focus farther away by the largest possible amount
If the focusing attempt fails it returns 0, otherwise it returns 1.

AutoFocus

SmartShooter AutoFocus

Tells the camera to carry out auto focus. If the focusing attempt fails it returns 0, otherwise it returns 1.

Set

SmartShooter Set <property> <value>

Changes the camera setting of the current camera to the specified value. The property parameter can be one of the following:

  • Aperture
  • ShutterSpeed
  • Iso
  • Exposure
  • Quality
  • MeteringMode
  • WhiteBalance
  • Storage
Each property has a valid list of values that can be set. The function GetList can be used to retrieve this list. If Smart Shooter fails to set the property it returns 0, otherwise it returns 1.

Get

SmartShooter Get <property>

Returns the value of the camera setting for the current camera. The property parameter can be one of the following:

  • Aperture
  • ShutterSpeed
  • Iso
  • Exposure
  • Quality
  • MeteringMode
  • WhiteBalance
  • Storage
If this fails it returns an empty string.

GetList

SmartShooter GetList <property>

Returns the list of valid value for the specified property. The property parameter can be one of the following:

  • Aperture
  • ShutterSpeed
  • Iso
  • Exposure
  • Quality
  • MeteringMode
  • WhiteBalance
  • Storage
The valid values for a particular property are are determined by the current camera model and setup. If this fails it returns an empty string.

DetectCameras

SmartShooter DetectCameras

Tells Smartshooter to detect cameras that may be available and attached to the computer. If Smart Shooter fails it returns 0, otherwise it returns 1.

Connect

SmartShooter Connect

Connects the current camera. If the connection fails it returns 0, otherwise it returns 1.

Disconnect

SmartShooter Disconnect

Disconnects the current camera. If the disconnection fails it returns 0, otherwise it returns 1.

Download

SmartShooter Download

Downloads the current photo. This function waits until the photo has been downloaded. If the download fails it returns 0, otherwise it returns 1.

DownloadAll

SmartShooter DownloadAll

Downloads any photos that have not yet been downloaded. This function waits until all photos have been downloaded. If the download fails it returns 0, otherwise it returns 1.

EnableLiveview

SmartShooter EnableLiveview

Enables liveview operation on the current camera. If Smart Shooter fails to enable liveview it returns 0, otherwise it returns 1.

DisableLiveview

SmartShooter DisableLiveview

Disables liveview operation on the current camera. If Smart Shooter fails to disable liveview it returns 0, otherwise it returns 1.

EnableDOF

SmartShooter EnableDOF

Enables liveview DOF preview on the current camera. If Smart Shooter fails to enable liveview DOF it returns 0, otherwise it returns 1.

DisableDOF

SmartShooter DisableDOF

Disables liveview DOF preview on the current camera. If Smart Shooter fails to disable liveview DOF it returns 0, otherwise it returns 1.

EnableVideo

SmartShooter EnableVideo

Enables video recording on the current camera. If Smart Shooter fails to enable video recording it returns 0, otherwise it returns 1.

DisableVideo

SmartShooter DisableVideo

Disables video recording on the current camera. If Smart Shooter fails to disable video recording it returns 0, otherwise it returns 1.

EnableLiveviewRecording

SmartShooter EnableLiveviewRecording

Enables liveview recording. When enabled, each liveview frame is saved as a JPEG image to the hard disk. If Smart Shooter fails to enable liveview recording it returns 0, otherwise it returns 1.

DisableLiveviewRecording

SmartShooter DisableLiveviewRecording

Disables liveview recording. If Smart Shooter fails to disable liveview recording it returns 0, otherwise it returns 1.

EnableMultiMode

SmartShooter EnableMultiMode

Enables multi mode, so that other commands are send to all cameras and not just the current camera. This function always returns 1.

DisableMultiMode

SmartShooter DisableMultiMode

Disables multi mode, so that commands are only send to the current camera. This function always returns 1.

GetNumPhotos

SmartShooter GetNumPhotos

Returns the number of photos that have been taken. If this fails it returns 0.

GetNumCameras

SmartShooter GetNumCameras

Returns the number of cameras that have been detected. If this fails it returns 0.

SetActivePhoto

SmartShooter SetActivePhoto <index>

Sets the current photo, which is then the target of subsequent function calls. This is a zero based index that relates to the list of photos that have been taken. If this fails it returns 0. otherwise it returns 1.

SetActiveCamera

SmartShooter SetActiveCamera <index|name>

Sets the current camera, which is then the target of subsequent function calls. This is a zero based index that relates to the list of cameras that have been detected. The camera can also be specified by name instead of index. If this fails it returns 0. otherwise it returns 1.

GetActivePhoto

SmartShooter GetActivePhoto

Returns the index of the current photo. This is a zero based index that relates to the list of photos that have been taken. If no photo has been taken, it returns an empty string. If this fails it returns an empty string.

GetActiveCamera

SmartShooter GetActiveCamera

Returns the index of the current camera. This is a zero based index that relates to the list of cameras that have been detected. If not camera has been detected it returns an empty string. If this fails it returns an empty string.

GetPhotoName

SmartShooter GetPhotoName

Returns the filename of the current photo. This is the filename of the photo on the local hard disk. If no photo has been taken, it returns an empty string. If this fails it returns an empty string.

GetCameraName

SmartShooter GetCameraName

Returns the name of the current camera. If not camera has been detected it returns an empty string. If this fails it returns an empty string.

GetCameraMake

SmartShooter GetCameraMake

Returns the make of the current camera. If not camera has been detected it returns an empty string. If this fails it returns an empty string.

GetPhotoDetails

SmartShooter GetPhotoDetails

Returns a list of details for the current photo. This is a list of name/value pairs, with entries for:

  • Index (same index as used by GetActivePhoto)
  • Owner (index of camera that took the photo)
  • Name
  • Filename
  • Filetype
  • Filesize
  • IsValid
  • IsDownloaded
  • IsOrphaned (indicates camera that took the photo has been disconnected)
  • IsVideo
  • SequenceNum
  • BatchNum
  • Origin
If no photo has been taken, it returns an empty string. If this fails it returns an empty string.

GetCameraDetails

SmartShooter GetCameraDetails

Returns a list of details for the current camera. This is a list of name/value pairs, with entries for:

  • Index (same index as used by GetActiveCamera)
  • Name
  • Make
  • Model
  • Serial
  • IsValid
  • IsConnected
  • IsBulbEnabled
  • IsBulbSupported
  • IsLiveviewSupported
  • IsLiveviewEnabled
  • IsLiveviewZoomEnabled
  • IsDofSupported
  • IsDofEnabled
  • IsVideoSupported
  • IsVideoEnabled
  • IsAutoFocusSupported
  • BatteryLevel (scale between 0.0 to 1.0, greater than 1.0 indicates AC power supply)
  • NumPhotosTaken
  • NumPhotosFailed
  • NumPhotosDownloaded
  • NumDownloadsFailed
  • NumConnectionAttempts
  • NumLiveviewFrames
If not camera has been detected it returns an empty string. If this fails it returns an empty string.

CheckStatus

SmartShooter CheckStatus

Checks the status of the Smart Shooter application. If your TCL script is doing constant processes, it needs to call this periodically to check that Smart Shooter is not exiting or trying to stop the script.

Wait

SmartShooter Wait <duration> <units>

Pauses execution of the script for the specified amount of time. The 'units' can be specified as either 'seconds' or 'milliseconds'; this parameter is optional and defaults to seconds.

WaitUntil

SmartShooter WaitUntil <time> <units>

Pauses execution of the script until a specified time has been reached. The value for 'time' works with the same concept as the builtin TCL function 'clock seconds' or 'clock milliseconds', allowing you to specify an absolute time based from an epoch time of 1 January 1970, 00:00 UTC. The 'units' can be specified as either 'seconds' or 'milliseconds'; this parameter is optional and defaults to seconds.