This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
action:For_Each [2016/03/20 00:28] JMichaelTX Added more details to the process |
action:For_Each [2017/09/07 01:44] peternlewis [See also] |
||
---|---|---|---|
Line 8: | Line 8: | ||
===== 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 | ||
- {{:action:km-editor-for-each-action.png?nolink|}} | - {{:action:km-editor-for-each-action.png?nolink|}} | ||
Line 19: | Line 20: | ||
- Drag one or more actions into the //No Action// (which means no actions have been added yet) area. | - Drag 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:Redirect_Control_Flow|actions:Redirect Control Flow]] actions. | ||
===== Examples ===== | ===== Examples ===== | ||
Line 26: | Line 29: | ||
{{:action:km-for-each-lines-example.png?nolink|}} | {{:action:km-for-each-lines-example.png?nolink|}} | ||
- | For a complete macro using this Action, see:\\ | + | For a complete macro using this Action, see [[https://forum.keyboardmaestro.com/t/macro-file-process-lines-in-text-file/2936|MACRO: [FILE] Process Lines in Text File]] |
- | [[https://forum.keyboardmaestro.com/t/macro-file-process-lines-in-text-file/2936|MACRO: [FILE] Process Lines in Text File]] | + | |
- | **Example #2: Get Capture Group for Multiple Matches**\\ | + | **Example #2: Get Capture Group for Multiple Matches** |
See [[:Regular Expressions#Examples|Regular Expressions (RegEx) Examples]] | See [[:Regular Expressions#Examples|Regular Expressions (RegEx) Examples]] | ||
Line 36: | Line 38: | ||
===== See also ===== | ===== See also ===== | ||
- | * [[action:Search Variable|action:Search Variable]] | + | === Actions === |
+ | |||
+ | * [[action:For_Each|For Each]] action | ||
+ | * [[action:Repeat|Repeat]] action | ||
+ | * [[action:Until|Until]] action | ||
+ | * [[action:While|While]] action | ||
+ | * [[Redirect_Control_Flow|actions:Redirect Control Flow]] actions | ||
+ | * [[:Actions|See all actions]] | ||
+ | |||
+ | === Triggers === | ||
* [[trigger:Typed String|trigger:Typed String]] | * [[trigger:Typed String|trigger:Typed String]] | ||
+ | * [[:Triggers|See all triggers]] | ||
- | ==== Forum topics ==== | ||
+ | ==== Forum ==== | ||
- [[https://forum.keyboardmaestro.com/t/text-filtering/2763/14|Text filtering]] | - [[https://forum.keyboardmaestro.com/t/text-filtering/2763/14|Text filtering]] | ||
Line 46: | Line 59: | ||
- [[https://forum.keyboardmaestro.com/t/macro-file-process-lines-in-text-file/2936|MACRO: [FILE] Process Lines in Text File]] | - [[https://forum.keyboardmaestro.com/t/macro-file-process-lines-in-text-file/2936|MACRO: [FILE] Process Lines in Text File]] | ||
- [[https://forum.keyboardmaestro.com/t/for-each-item-difficulty-understanding-action/3162/2|For Each Item]] | - [[https://forum.keyboardmaestro.com/t/for-each-item-difficulty-understanding-action/3162/2|For Each Item]] | ||
- | - [[https://www.google.fr/search?q=site:forum.keyboardmaestro.com+For+Each+Item|Keyboard Maestro Forum topics about For Each Item]] | + |