User Guide
CustomActions.install() 233
CustomActions.install()
Availability
Flash Player 6.
Usage
CustomActions.install(customName:String, customXML:String) : Boolean
Parameters
customName
The name of the custom action definition to install.
customXML The text of the XML definition to install.
Returns
A Boolean value of false if an error occurs during installation; otherwise, a value of true is
returned to indicate that the custom action has been successfully installed.
Description
Method; installs a new custom action XML definition file indicated by the customName
parameter. The contents of the file is specified by the string
customXML.
The name of the definition file must be a simple filename, without the .xml file extension, and
without any directory separators (':', '/' or '\').
If a custom actions file already exists with the name
customName, it is overwritten.
If the Configuration/ActionsPanel/CustomActions directory does not exist when this method is
invoked, the directory is created.
Example
The following example installs information into the Actions panel from an XML file. Open a text
editor and save a new document called dogclass.xml. Enter the following code:
<?xml version="1.0"?>
<customactions>
<actionspanel>
<folder version="7" id="DogClass" index="true" name="Dog" tiptext="Dog
Class">
<string version="7" id="getFleas" name="getFleas" tiptext="gets number
of fleas" text=".getFleas(% fleas %)" />
</folder>
</actionspanel>
<colorsyntax>
<identifier text=".getFleas" />
</colorsyntax>
<codehints>
<typeinfo pattern="*_dog" object="Dog"/>
</codehints>
</customactions>