Excellent homework! And I'm thrilled with your questions, because it shows me we started in the right place.
[EDIT] I've just finished typing this, and it makes be realize how may topics this covers. And some of these topics will either totally make sense, or they'll blow your mind. And it's OK if they blow your mind - you won't be the first person to have trouble understanding these concepts.
So be patient with yourself, because if you can end up really understand these concepts, then you've actually passed the biggest hurdle you'll have to going forward.
Good work on HFS vs. POSIX paths. Fortunately, as far as I know, you only need to deal with POSIX paths, which are very similar to Windows paths, except the Mac uses slashes, and Windows uses backslashes. So in KM, we just usually talk about them being "paths".
In Finder, if you right-click on a file, then hold down the Option key, the menu changes and it has an item to copy the file as a pathname, and you get a POSIX path. Most people don't even know about HFS paths.
You never have to "define" them first, like you do with lots of programming languages. Just start using one. Of course, if you want it to contain a value, then you need to put something in it. However:
"Normal" KM variables keep their values even when the macro finishes running. If you go to "Keyboard Maestro->Preferences" and click on the "Variables" tab, you'll probably see some "normal" (aka "global") variables there.
You can name variables almost anything you want. Check out the Wiki for the rules.
But: Variables that start with "Local" only exist while the macro is running. At the start of the macro, they're empty. And they automatically get deleted when the macro ends. That's why I used variable names that start with "Local". Well, I actually use "Local_" (with an underscore), but that's just a personal preference.
Variables that start with "Instance" are basically the same as "Local", but for now the difference isn't relevant, until you start working with what we like to call "sub-macros".
So: Use variable names that start with "Local" until you have a reason not to.
Aside from the "Local" as I mentioned above, it's just a name that made sense to me.
As I mentioned earlier, you don't have to define variables beforehand, so this isn't technically a case of me defining the variable. But since it gets a new value each time through the loop, I could understand why you might think of it as "defining a variable", but again, you don't need to define them.
I chose this name because it's where I'm putting all the paths you had selected in Finder.
Append Variable action:
Whatever I put in the text box will be appended to the end of the variable. So you could read that as "Append what's in the text box to the variable Local_SelectedPaths".
Try this: Add this "Prompt for User Input" action:
Every time the loop repeats (make sure you've selected more than one file in Finder), you can see the value changing.
If you click the "Gear" icon in the "Append Variable" action, you can change it to "Prepend" or "Set Variable". The former puts the text in front of anything already in the variable, and "Set Variable" replaces whatever is in the variable with the data in the text box. Try it to see what happens.
This is how you get the value from the variable, when you're in a text box. You ask why the % in the middle, and my answer is, because that's what the Wiki or Help says to do.
This is a concept that's hard for some people to grasp, so let me know if this ends up making sense or not.
"This suggest that..."
"How did the local path get acquired..."
I used the action "For each Path in Finder Selection".
"For each [variable name] in these collections:
A "collection" is exactly that. A collection of things. This action "iterates" through each item in the collection. Each time it loops, the variable "Local_Path" contains the next item in the collection.
"The Finder's selection"
In this case, the "collection" is a collection of each file selected in Finder. There's a bunch of "collections" you can chose from.
"execute the following actions"
This is what gets executed for each item in the collection. In this case, it's for the path of each selected file in Finder.
I'm sure you have more questions. Mess around with this and see what you can figure out. You can't hurt anything, unless you add a "Delete File" action, or something like that.
Let me know how you're doing.