action:For_Each
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| action:For_Each [2016/07/04 06:45] – add internal links alain | action:For_Each [2024/11/22 07:50] (current) – [See also] peternlewis | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | {{: | ||
| ====== For Each Action ====== | ====== For Each Action ====== | ||
| - | The For Each action loops over a set of [collections](: | + | The *For Each* action loops over a set of [collections](: |
| + | |||
| + | It is one of several Actions that _loop_ through a set of other Actions until some criteria is met. | ||
| Whenever you need to deal with a list of things (lines, files, volumes, numbers, etc), the For Each action is a good place to start. | Whenever you need to deal with a list of things (lines, files, volumes, numbers, etc), the For Each action is a good place to start. | ||
| ===== How To Use ===== | ===== How To Use ===== | ||
| + | |||
| - Add the //For Each// Action, from the //Control Flow// Category, to your macro | - Add the //For Each// Action, from the //Control Flow// Category, to your macro | ||
| - {{: | - {{: | ||
| Line 17: | Line 19: | ||
| - Add a collection by clicking the green + button beside //New Collection// | - Add a collection by clicking the green + button beside //New Collection// | ||
| - When you choose a specific collection, further options may become available. | - When you choose a specific collection, further options may become available. | ||
| - | - Drag one or more actions into the //No Action// (which means no actions have been added yet) area. | + | - Add one or more actions into the //No Action// (which means no actions have been added yet) area. |
| * These actions will operate on each item in the Collection that is stored in the Variable from Step #2 | * These actions will operate on each item in the Collection that is stored in the Variable from Step #2 | ||
| + | |||
| + | You can break out of the loop, retry this iteration, or skip to the next iteration with the [[actions: | ||
| + | |||
| + | There is an option in the action (gear) ⚙ menu to display the progress of the For Each action (v10.0+). | ||
| ===== Examples ===== | ===== Examples ===== | ||
| Line 26: | Line 32: | ||
| {{: | {{: | ||
| - | For a complete macro using this Action, see:\\ | + | For a complete macro using this Action, see [[https:// |
| - | [[https:// | + | |
| - | **Example #2: Get Capture Group for Multiple Matches**\\ | + | **Example #2: Get Capture Group for Multiple Matches** |
| See [[:Regular Expressions# | See [[:Regular Expressions# | ||
| Line 35: | Line 40: | ||
| ===== See also ===== | ===== See also ===== | ||
| - | |||
| - | ---- | ||
| === Actions === | === Actions === | ||
| - | * [[action:Search Variable|action:Search Variable]] | + | * [[action:Pause_Until|Pause Until]] action |
| + | * [[action:Repeat|Repeat]] action | ||
| + | * [[action: | ||
| + | * [[action: | ||
| + | * [[action: | ||
| + | * [[actions: | ||
| * [[: | * [[: | ||
| + | |||
| === Triggers === | === Triggers === | ||
| Line 47: | Line 56: | ||
| * [[trigger: | * [[trigger: | ||
| * [[: | * [[: | ||
| - | |||
| - | ---- | ||
| ==== Forum ==== | ==== Forum ==== | ||
| Line 56: | Line 63: | ||
| - [[https:// | - [[https:// | ||
| - [[https:// | - [[https:// | ||
| - | |||
| - | - [[https:// | ||
action/For_Each.1467614749.txt.gz · Last modified: by alain
