I am understanding difficulty in understanding the For Each Item action. I understand the purpose of the action, based on the first paragraph of the Wiki help for this action:
The For Each action loops over a set of collections of items, setting a variable to each value and executing the contained actions.
but am having difficulty applying it to the description on the Wiki page or examples found on the user forum.
In the line that is “For Each [Variable] in these collections”. Is what you type for [Variable]
- to set as a variable the name you type (so that each item that follows based on the following line (‘The Finder’s Selection’, ‘The lines in’) has the value; or
- is a variable already set elsewhere or in a prior step?
I think it is 1.
Also I do not seem to see any explanation of what each of the Collections do (the titles may be obvious in some contexts), but not how an actual item works: i.e. an explanation of The Finder’s Selection, in the context of a macro is missing (whether you just have to a Finder window open, or a folder selected etc).
The example on the Wiki seems quite complicated (and those posted in the Forums), and all seem to assume what the first very step of “For Each [Variable] in these collections” is.
Would it be possible for the Wiki to have some more basic explanation and a few very simple examples? I admit I am a very basic user but I am obviously missing something very fundamental here. My understanding of looping macros is limited to that found in the macro languages for WordPerfect and now FileMaker, which from my view point operate differently.
Any help would be gratefully received.