I want to loop through a bunch of files in a directory. Having selected the first file in the folder, I use the KM [Select "Open" in the Menu "File" in Finder], It opens the file, then closes the folder window in the Finder. Which, of course, means I can't loop through the other files.
When I do the "Open" command manually, it does not close the window, so presumably it isn't a Finder setting. The same problem occurs if, instead of using a "Select" menu item, I use "Type the Cmd-O Key".
How can I prevent the Finder window from closing on me?
It sounds like you're looping through these files by having KM simulate the same actions you would do yourself, which is not the optimal way to accomplish a task like this. To start, try the For Each action with the Finder's Selection collection and the Open a File, Folder, or Application action to open all the currently selected files, then add any other actions you'd like KM to perform on the files after the "Open File" one.