Looking at your actual task I think there might be another way to do this.
First in Finder multiple-select all the files you want to use as the new names. Press ⌘C to copy all the names at once to a list in the System Clipboard.
Then multiple-select all the files that you want to rename and run the Macro (hotkey is ⌃⌘V at the moment).
This will overwrite the selected files' names with the copied filenames.
This does depend on both sets of files being in the correct order and there is no undo so, try it out on some test files first! I also added a Prompt Action that pops up for each file. If the preview of the renaming is not correct you can press Cancel to exit the Macro at any point.
EXAMPLE Paste Multiple Copied File Names.kmmacros (20.5 KB)
EDIT - as @tiffle was suggesting that this could be started as a new post, I have split it off here, into its own question.