Adobe 65009963 Scripting Manual page 162

After effects cs4
Table of Contents

Advertisement

JavaScript Reference
Settings object
Description
The Settings object provides an easy way to manage settings for scripts. The settings are saved in the After
Effects preferences file and are persistent between application sessions. Settings are identified by section and
key within the file, and each key name is associated with a value. In the preferences file, section names are
enclosed in brackets and quotation marks, and key names are listing in quotation marks below the section
name. All values are strings.
You can create new settings with this object, as well as accessing existing settings.
Methods
Method
Reference
s av e S e tt i n g ()
"Settings saveSetting() method" on page 163
ge tS et ti ng( )
"Settings getSetting() method" on page 162
h aveS e tt in g ()
"Settings haveSetting() method" on page 162
Settings getSetting() method
a pp . se t t i ng s .get Sett ing( se ct i on N a m e, ke y N am e )
Description
Retrieves a scripting preferences item value from the preferences file.
Parameters
s e c t io n N am e
A string containing the name of a settings section
k ey N a m e
A string containing the key name of the setting item.
Returns
String.
Example
If you have saved a setting named with the key name "Aligned Clone" in the "Eraser - Paint Settings" section,
you can retrieve the value with this script:
v a r n = ap p .se tt i n g s. g e t Se tt i n g (" E r as e r - P a i n t S e t t i n g s ", " A l i g n e d C l o n e " ) ;
a l e r t (" T h e s e tt i n g i s " + n );
Settings haveSetting() method
a pp . se t t i ng s .ha veSet ting( s ec t i o n N a m e , k e y N a m e)
Description
Returns true if the specified scripting preferences item exists and has a value.
Description
Saves a default value for a setting.
Retrieves a setting value.
Reports whether a specified setting is assigned.
Settings object
162
162

Advertisement

Table of Contents
loading

This manual is also suitable for:

Creative suite 3 after effects

Table of Contents