TextVariable
A text variable definition in a document.
Go to Property Listing | Method Listing
Methods:
addEventListener, convertToText, getElements, remove, removeEventListener, toSource, toSpecifier
Objects:
Boolean, CaptionMetadataVariablePreference, ChapterNumberVariablePreference, CustomTextVariablePreference, DateVariablePreference, EventListeners, Events, FileNameVariablePreference, MatchCharacterStylePreference, MatchParagraphStylePreference, Number, Object, PageNumberVariablePreference, Preferences, String, TextVariableInstance, VariableTypes,
Preferences:
CaptionMetadataVariablePreference, ChapterNumberVariablePreference, CustomTextVariablePreference, DateVariablePreference, FileNameVariablePreference, MatchCharacterStylePreference, MatchParagraphStylePreference, PageNumberVariablePreference, Preferences,
Property Listing
Property |
Type |
Access |
Description |
---|---|---|---|
readonly |
Variable instances associated with the text variable. |
||
readonly |
A collection of event listeners. |
||
readonly |
A collection of events. |
||
readonly |
The index of the TextVariable within its containing object. |
||
readonly |
Returns true if the object specifier resolves to valid objects. |
||
read/write |
The name of the TextVariable. |
||
readonly |
The parent of the TextVariable (a Application or Document). |
||
readonly |
A collection of preferences objects. |
||
read/write |
A property that allows setting of several properties at the same time. |
||
readonly |
The preferences associated with the text variable. Can return: PageNumberVariablePreference, ChapterNumberVariablePreference, DateVariablePreference, FileNameVariablePreference, MatchCharacterStylePreference, MatchParagraphStylePreference, CustomTextVariablePreference or CaptionMetadataVariablePreference. |
||
read/write |
The variable type. |
Method Listing
EventListener addEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])
Adds an event listener.
Parameter |
Type |
Description |
---|---|---|
eventType |
The event type. |
|
handler |
JavaScriptFunction |
The event handler. Can accept: File or JavaScript Function. |
captures |
This parameter is obsolete. (Optional) (default: false) |
Text convertToText ()
Convert all of this variable's instances to text.
TextVariable getElements ()
Resolves the object specifier, creating an array of object references.
undefined remove ()
Deletes the TextVariable.
Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])
Removes the event listener.
Parameter |
Type |
Description |
---|---|---|
eventType |
The registered event type. |
|
handler |
JavaScriptFunction |
The registered event handler. Can accept: File or JavaScript Function. |
captures |
This parameter is obsolete. (Optional) (default: false) |
String toSource ()
Generates a string which, if executed, will return the TextVariable.
String toSpecifier ()
Retrieves the object specifier.
Object of
TextVariableInstance.associatedTextVariable
CaptionMetadataVariablePreference.parent
ChapterNumberVariablePreference.parent
CustomTextVariablePreference.parent
DateVariablePreference.parent
Event.parent
EventListener.parent
FileNameVariablePreference.parent
MatchCharacterStylePreference.parent
MatchParagraphStylePreference.parent
MutationEvent.parent
PageNumberVariablePreference.parent
Preference.parent