Context ($context)

Document created by DPM Admin Employee on Jul 21, 2017
Version 1Show Document
  • View in full screen mode

Contains the object model that represents the Composition.

Context Properties

All of the following Context properties are read only:

    • composition

The "Composition" object that represents the top of the Composition object model.

    • result

The "Result" object that represents the Result being produced for the currently playing Composition.

    • currentBand

A "Band" object that represents the current Band according to the context in which the current script is executing.  Null if there is no current Band.

    • currentBandIndex

An integer value that represents the "repeat index" of the current Band if the current Band repeats, according to the context in which the current script is executing.  The first repeat starts at index zero.  The value is -1 if there is no current Band, or the current Band does not repeat.

    • currentBandPlayNumber

An integer value that represents the “play ordinal number” of the current Band.  Starting with the number 0, each play of the Band is assigned a unique number.  The numbers are contiguous (no gaps).  The value is -1 if there is no current Band.

Play number sequences are maintained within the item’s parent only.  For example, if a parent item repeats, then the child items inside each repeat of the parent will have their own play number sequence starting at 0.

An item will only have a non-zero play number if it repeats.  The play number is equivalent to the repeat index, except that the play number is 0 for items that don’t repeat or have a repeat count of one, whereas the repeat index would be -1 in those cases.

    • currentItem

An object that represents the current Item according to the context in which the current script is executing.  Null if there is no current Item.

    • currentClip

A "Clip" object that represents the current Clip according to the context in which the current script is executing.  Null if there is no current Clip.

    • currentClipIndex

An integer value that represents the "repeat index" of the current Clip if the current Clip repeats, according to the context in which the current script is executing.  The first repeat starts at index zero.  The value is -1 if there is no current Clip, or the current Clip does not repeat.

    • currentClipPlayNumber

An integer value that represents the “play ordinal number” of the current Clip.  Starting with the number 0, each play of the Clip is assigned a unique number.  The numbers are contiguous (no gaps).  The value is -1 if there is no current Clip.

Play number sequences are maintained within the item’s parent only.  For example, if a parent item repeats, then the child items inside each repeat of the parent will have their own play number sequence starting at 0.

An item will only have a non-zero play number if it repeats.  The play number is equivalent to the repeat index, except that the play number is 0 for items that don’t repeat or have a repeat count of one, whereas the repeat index would be -1 in those cases.

    • currentBrowserAction

A "BrowserAction" object that represents the current Browser Action according to the context in which the current script is executing.  Null if there is no current Browser Action.

    • currentBrowserActionIndex

An integer value that represents the "repeat index" of the current Browser Action if the current Browser Action repeats, according to the context in which the current script is executing.  The first repeat starts at index zero.  The value is -1 if there is no current Browser Action, or the current Browser Action does not repeat.

    • currentBrowserActionPlayNumber

An integer value that represents the “play ordinal number” of the current Browser Action. Starting with the number 0, each play of the Browser Action is assigned a unique number. The numbers are contiguous (no gaps). The value is -1 if there is no current Browser Action.

Play number sequences are maintained within the item’s parent only. For example, if a parent item repeats, then the child items inside each repeat of the parent will have their own play number sequence starting at 0.

An item will only have a non-zero play number if it repeats. The play number is equivalent to the repeat index, except that the play number is 0 for items that don’t repeat or have a repeat count of one, whereas the repeat index would be -1 in those cases.

    • currentChain

A "Chain" object that represents the current Chain according to the context in which the current script is executing.  Null if there is no current Chain.

    • currentChainIndex

An integer value that represents the "repeat index" of the current Chain if the current Chain repeats, according to the context in which the current script is executing.  The first repeat starts at index zero.  The value is -1 if there is no current Chain, or the current Chain does not repeat.

    • currentChainPlayNumber

An integer value that represents the “play ordinal number” of the current Chain.  Starting with the number 0, each play of the Chain is assigned a unique number.  The numbers are contiguous (no gaps).  The value is -1 if there is no current Chain.

Play number sequences are maintained within the item’s parent only.  For example, if a parent item repeats, then the child items inside each repeat of the parent will have their own play number sequence starting at 0.

An item will only have a non-zero play number if it repeats.  The play number is equivalent to the repeat index, except that the play number is 0 for items that don’t repeat or have a repeat count of one, whereas the repeat index would be -1 in those cases.

    • currentCheckpoint

A "Checkpoint" object that represents the current Checkpoint according to the context in which the current script is executing.  Null if there is no current Checkpoint.

    • currentGroup

A "Group" object that represents the current Group according to the context in which the current script is executing. Null if there is no current Group.

    • currentGroupIndex

An integer value that represents the “repeat index” of the current Group if the current Group repeats, according to the context in which the current script is executing. The first repeat starts at index zero. The value is -1 if there is no current Group or if the current Group does not repeat.

    • currentGroupPlayNumber

An integer value that represents the “play ordinal number” of the current Group.  Starting with the number 0, each play of the Group is assigned a unique number.  The numbers are contiguous (no gaps).  The value is -1 if there is no current Group.

Play number sequences are maintained within the item’s parent only.  For example, if a parent item repeats, then the child items inside each repeat of the parent will have their own play number sequence starting at 0.

An item will only have a non-zero play number if it repeats.  The play number is equivalent to the repeat index, except that the play number is 0 for items that don’t repeat or have a repeat count of one, whereas the repeat index would be -1 in those cases.

    • currentIf

An “If” object that represents the current If according to the context in which the current script is executing. Null if there is no current If. If nested within multiple Ifs, this is the lowest-level If (the If “nearest to” the Script in terms of the parentage hierarchy).

    • currentIfIndex

An integer value that represents the “repeat index” of the current If if the current If repeats, according to the context in which the current script is executing.  The first repeat starts at index zero.  The value is -1 if there is no current If or if the current If does not repeat or has a repeat count of one (in other words, it is -1 if it doesn’t actually repeat).

    • currentIfPlayNumber

An integer value that represents the “play ordinal number” of the current If.  Starting with the number 0, each play of the If is assigned a unique number.  The numbers are contiguous (no gaps).  The value is -1 if there is no current If.

Play number sequences are maintained within the item’s parent only.  For example, if a parent item repeats, then the child items inside each repeat of the parent will have their own play number sequence starting at 0.

An item will only have a non-zero play number if it repeats.  The play number is equivalent to the repeat index, except that the play number is 0 for items that don’t repeat or have a repeat count of one, whereas the repeat index would be -1 in those cases.

    • currentMessage

A "Message" object that represents the current Message according to the context in which the current script is executing.  Null if there is no current Message.

    • currentMessageIndex

An integer value that represents the "repeat index" of the current Message if the current Message repeats, according to the context in which the current script is executing.  The first repeat starts at index zero.  The value is -1 if there is no current Message, or the current Message does not repeat.

    • currentMessagePlayNumber

An integer value that represents the “play ordinal number” of the current Message.  Starting with the number 0, each play of the Message is assigned a unique number.  The numbers are contiguous (no gaps).  The value is -1 if there is no current Message.

Play number sequences are maintained within the item’s parent only.  For example, if a parent item repeats, then the child items inside each repeat of the parent will have their own play number sequence starting at 0.

An item will only have a non-zero play number if it repeats.  The play number is equivalent to the repeat index, except that the play number is 0 for items that don’t repeat or have a repeat count of one, whereas the repeat index would be -1 in those cases.

    • currentPage

A "Page" object that represents the current Page according to the context in which the current script is executing. Null if there is no current Page.

    • currentPageIndex

An integer value that represents the "repeat index" of the current Page if the current Page repeats, according to the context in which the current script is executing. The first repeat starts at index zero. The value is -1 if there is no current Page or if the current Page does not repeat.

    • currentPagePlayNumber

An integer value that represents the “play ordinal number” of the current Page.  Starting with the number 0, each play of the Page is assigned a unique number.  The numbers are contiguous (no gaps).  The value is -1 if there is no current Page.

Play number sequences are maintained within the item’s parent only.  For example, if a parent item repeats, then the child items inside each repeat of the parent will have their own play number sequence starting at 0.

An item will only have a non-zero play number if it repeats.  The play number is equivalent to the repeat index, except that the play number is 0 for items that don’t repeat or have a repeat count of one, whereas the repeat index would be -1 in those cases.

    • currentSwitch

A “Switch” object that represents the current Switch according to the context in which the current script is executing.  Null if there is no current Switch.  If nested within multiple Switches, this is the lowest-level Switch (the Switch “nearest to” the Script in terms of the parentage hierarchy).

    • currentSwitchIndex

An integer value that represents the “repeat index” of the current Switch if the current Switch repeats, according to the context in which the current script is executing.  The first repeat starts at index zero.  The value is -1 if there is no current Switch or if the current Switch does not repeat or has a repeat count of one (in other words, it is -1 if it doesn’t actually repeat).

    • currentSwitchPlayNumber

An integer value that represents the “play ordinal number” of the current Switch.  Starting with the number 0, each play of the Switch is assigned a unique number.  The numbers are contiguous (no gaps).  The value is -1 if there is no current Switch.

Play number sequences are maintained within the item’s parent only.  For example, if a parent item repeats, then the child items inside each repeat of the parent will have their own play number sequence starting at 0.

    An item will only have a non-zero play number if it repeats.  The play number is equivalent to the repeat index, except that the play number is 0 for items that don’t repeat or have a repeat count of one, whereas the repeat index would be -1 in those cases.
  • currentScript

A "Script" object that represents the current Script according to the context in which the current script is executing.  Null if there is no current Script.

  • currentScriptIndex

An integer value that represents the "repeat index" of the current Script component, if that current Script component repeats, according to the context in which it is executing. The first repeat starts at index zero.  The value is -1 if there is no current Script, or the current Script does not repeat.

  • currentScriptPlayNumber

An integer value that represents the “play ordinal number” of the current Script.  Starting with the number 0, each play of the Script is assigned a unique number.  The numbers are contiguous (no gaps).  The value is -1 if there is no current Script.

Play number sequences are maintained within the item’s parent only.  For example, if a parent item repeats, then the child items inside each repeat of the parent will have their own play number sequence starting at 0.

An item will only have a non-zero play number if it repeats.  The play number is equivalent to the repeat index, except that the play number is 0 for items that don’t repeat or have a repeat count of one, whereas the repeat index would be -1 in those cases.

  • currentTarget

A "Target" object that represents the current Target according to the context in which the current script is executing.  Null if there is no current Target.

  • currentDelay

A "Delay" object that represents the current Delay component according to the context in which the current script is executing.  Null if there is no current Delay component.

  • currentTrack

A "Track" object that represents the current Track according to the context in which the current script is executing.  Null if there is no current Track.

  • currentTrackIndex

An integer value that represents the "repeat index" of the current Track if the current Track repeats, according to the context in which the current script is executing.  The first repeat starts at index zero.  The value is -1 if there is no current Track, or the current Track does not repeat.

  • currentTrackPlayNumber

An integer value that represents the “play ordinal number” of the current Track.  Starting with the number 0, each play of the Track is assigned a unique number.  The numbers are contiguous (no gaps).  The value is -1 if there is no current Track.

Play number sequences are maintained within the item’s parent only.  For example, if a parent item repeats, then the child items inside each repeat of the parent will have their own play number sequence starting at 0.

An item will only have a non-zero play number if it repeats.  The play number is equivalent to the repeat index, except that the play number is 0 for items that don’t repeat or have a repeat count of one, whereas the repeat index would be -1 in those cases.

  • currentTransaction

A “Transaction” object that represents the current Transaction according to the context in which the current script is executing. Null if there is no current Transaction. If nested within multiple Transactions, this is the lowest-level Transaction (the Transaction “nearest to” the Script in terms of the parentage hierarchy).

  • currentTransactionIndex

An integer value that represents the “repeat index” of the current Transaction if the current Transaction repeats, according to the context in which the current script is executing. The first repeat starts at index zero. The value is -1 if there is no current Transaction or if the current Transaction does not repeat or has a repeat count of one (in other words, it is -1 if it doesn’t actually repeat).

  • currentTransactionPlayNumber

An integer value that represents the “play ordinal number” of the current Transaction. Starting with the number 0, each play of the Transaction is assigned a unique number. The numbers are contiguous (no gaps). The value is -1 if there is no current Transaction.

Play number sequences are maintained within the item’s parent only. For example, if a parent item repeats, then the child items inside each repeat of the parent will have their own play number sequence starting at 0.

An item will only have a non-zero play number if it repeats. The play number is equivalent to the repeat index, except that the play number is 0 for items that don’t repeat or have a repeat count of one, whereas the repeat index would be -1 in those cases.

  • validationValue

If the current Script was called to perform validation for Message or Browser Action response, this property contains the value to be validated. If the Script was called to perform overall validation, this will be the entire response, otherwise it will be the specific portion of the response that is to be validated.

Note that the Script also has access to the response through the methods of the Message or Browser Action object.

If the current Script was not called to perform validation, this value will be null.

  • userName

The user ID of the user that started the current Composition playing.

  • locationName

The name of the location (from the Server List) on which the Composition is playing. If the Composition is playing on multiple Maestro servers, this will be the name of the location of the particular server that this Script is playing on.

  • serverName

The name of the server (from the Server List) on which the Composition is playing. If the Composition is playing on multiple Maestro servers, this will be the name of the particular server that this Script is playing on.

 

Context Object Methods

 

abortScript

Immediately aborts play of the current Script, and considers the Script to have failed with the given error text.  If no error text is provided, the text Script aborted. is used.


void abortScript(string errorText)

readFromURL

This function has been replaced by the "readFromURL" function on the SystemUtilities object, and is maintained here only for backwards compatibility.


 

Attachments

    Outcomes