Working with settings

By changing settings from a script, you can automate almost everything that can be done using a mouse and keyboard in the settings windows (administrator interface).

s = settings("ip_cameras/My favorite IP camera")
s = settings("/Different server/ip_cameras/Camera on a different server") 

The settings() function will find the desired settings folder. The folder has values that can be read and written using square brackets.

x = s["channel00_fps"]
s["channel01_fps] = 25 

The activate_on_changes() function lets you track changes in the folder:

s = settings("channels/Camera 1/stats")
def f():
	alert( s["fps"] )
s.activate_on_changes(f) 

You can substantially change the server's configuration by working with settings. As an example, use a script to convert TRASSIR 2 settings to TRASSIR 3.