User Tools

Site Tools


example_changecameramode

Example: Change camera mode of all connected cameras

This script changes the camera mode off all connected cameras to “photo”.

// Get a list of connected cameras
var cameraList = GetCameraList(true);

// Iterate over all cameras and set the mode to "photo"
for (var i=0; i<cameraList.length; ++i)
{
    if (GetCameraMode(cameraList[i]) != "photo")
    {
        SetCameraMode("photo", cameraList[i], false);
    }
}
example_changecameramode.txt · Last modified: 2016/09/06 08:36 by act