List Get
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
| Input | Required | Value Kind | Types | Enum Values |
|---|---|---|---|---|
list | yes | expression | array | — |
where | no | expression | enum-string | INDEX, FIRST, LAST, FROM_END, RANDOM |
index | no | expression | number | — |
Notes
- Pure read expression for list access.
wheremodes:INDEX: zero-based from start; requiresindex.FIRST: first element.LAST: last element.FROM_END: zero-based from end (index=0means last element).RANDOM: random element.
- If
whereis omitted, behavior is the legacy/defaultINDEXmode. indexis only used forINDEXandFROM_END.
Examples
Apply Scene Edit Cuts With Adjacent Clips
Applies Premiere Scene Edit Detection to one middle clip, fully relists the track, and verifies that directly adjacent clips keep their timeline and source ranges.
Topics: scene edit detection, timeline cuts, neighbor clips, runtime validation
Source: patterns/ex-scene-edit-detect-apply-cuts-with-neighbors.json
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.
Topics: project import, embedded assets, runtime validation
Source: patterns/ex-project-import-local-media-file.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.
Topics: timeline placement, source range placement, sequence creation
Source: patterns/ex-sequence-place-multiple-source-ranges-from-one-clip.json