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
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
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.
Topics: timeline placement, project item properties, source range placement
Source: patterns/ex-sequence-set-project-item-in-out-and-place.json