CommandFusion iViewer
Scripting Documentation

Table of contents

Global variables and constants

iViewer defines one global variable (CF) which itselfs holds a number of variables that you can use in your script. CF also contains a number of constants to be used with several of the iViewer APIs.

CF variables summary

The Javascript interface to iViewer defines a single object: CF. All functions and variables exposed by iViewer exist in this object, so as to completely encapsulate the iViewer interface into a single object.

You are strongly advised not to change anything in the CF object. Variables are updated automatically by iViewer itself, any manual change you make to the documented variables will be overwritten. Moreover, any change you make to undocumented variables may break the interface between JavaScript and iViewer.

The CF object exposes a number of variables:

CF.device

Information about the current device if available in the CF.device object, which exposes the following properties:

CF constants summary

A number of constants are defined for convenience. You use them in API calls and for comparison with current CF variables values:

Hash type constants for CF.hash():

CRC type constants for CF.crc():

Output format constants for CF.crc():

Special item index values for CF.listUpdate()

List scroll position constants for CF.listScroll()

Sensor constants - see Sensors for more info