Skip to content

ForEach

Hariiiiiiii edited this page Feb 2, 2021 · 2 revisions

The foreach command can be used to execute another command on a set of tags or tag blocks specified using a provided filter.

ForEach On Tags

Executes a command on every instance of the specified tag group.

Usage

ForEach [const] <tag group> [named: <regex>] <command>

  • tag group - A valid tag group.
  • named: - Filters the results by the given regex string.
  • regex - regex string to filter the results by.
  • command - The command you want to execute on the tags specified.

ForEach On Tag Elements

Executes a command for each element in the specified tag block.

Usage

ForEach <tag Block> [from: *] [to: *] <Command>

  • tag block - A valid tag block.
  • from: - Index to start from.
  • to: - Index to end at.
  • command - The command you want to execute on the tag blocks specified.
Clone this wiki locally