Skip to main content

List Get

Category: Lists List Get block screenshot

Reads one element from a list and returns it as an expression. Use `where` to choose whether the element comes from a zero-based `INDEX`, the `FIRST` item, the `LAST` item, a zero-based `FROM_END` position, or a `RANDOM` position. If `where` is omitted, the block uses the legacy/default `INDEX` mode. The `index` input is only used for `INDEX` and `FROM_END`, and `index=0` in `FROM_END` means the last element. Reading from an empty list or using an out-of-range index throws an error.

Inputs

InputRequiredValue KindTypesEnum Values
listyesexpressionarray
wherenoexpressionenum-stringINDEX, FIRST, LAST, FROM_END, RANDOM
indexnoexpressionnumber

Notes

  • Pure read expression for list access.
  • where modes:
    • INDEX: zero-based from start; requires index.
    • FIRST: first element.
    • LAST: last element.
    • FROM_END: zero-based from end (index=0 means last element).
    • RANDOM: random element.
  • If where is omitted, behavior is the legacy/default INDEX mode.
  • index is only used for INDEX and FROM_END.

Examples

Import Local Media File Into Project

Imports a fixed local media file into the current Premiere project with `avoidDuplicates=true`. This stays visible as the canonical local-path counterpart to the portable embedded-media ABSCRIPT example.

kind: Pattern · format: runtime-dsl · validation: MCP fixture

Topics: project import, embedded assets, runtime validation

Source: patterns/ex-project-import-local-media-file.json

Download JSON

Place Multiple Source Ranges From One Clip

Creates an empty sequence, then fills it with three explicit source ranges from one clip while verifying the original project-item in/out gets restored afterward.

kind: Pattern · format: runtime-dsl · validation: MCP fixture

Topics: timeline placement, source range placement, sequence creation

Source: patterns/ex-sequence-place-multiple-source-ranges-from-one-clip.json

Download JSON

Set Project Item In/Out Then Place It

Sets a clip project item's source in/out, places it into a new sequence without explicit source-range overrides, then verifies that placement used the current project-item range.

kind: Pattern · format: runtime-dsl · validation: MCP fixture

Topics: timeline placement, project item properties, source range placement

Source: patterns/ex-sequence-set-project-item-in-out-and-place.json

Download JSON