I’m checking out KM and considering switching from Quickeys. At first it looked good, so I started re-creating some of my QK shortcuts. Key substitutions were no problem, but when I tried to do something as simple as moving a file selected in the Finder to a specific folder I was surprised at how difficult this was. I spent a good hour on it before I got it to work.
Even though there is a macro for moving a file, I finally found (searching the internet) that I had to use %Variable%Path% for the target. I can’t believe that “Finder selection” is not an option. It still didn’t work though and I found someone had written a macro to do this that involved “For each item in a collection execute actions” that had to contain the move file macro. Not only does this seem unnecessarily complicated, I can’t even find this item in the actual program, just in the macro I imported.
It also seemed as if many of the examples I found of how to do things in KM started with “write this Applescript(s)” which made me wonder why I didm’t just do the whole thing with Applescript.
Is it really this hard to set up such a simple action? In Quickeys it’s “move finder selection to X”. I don’t understand why the macro for moving a file doesn’t contain all the necessary information to begin with. I’m concerned about anything more involved if this one thing took me so long to sort out.
Thanks for you help.
Keyboard Maestro and QuicKeys are very different, and can be a bit jarring initially, but I frequently get the comment along the lines of “Why didn’t I switch sooner”.
Please read the wiki page on transitioning from QuicKeys for some tips, and also read the Quick Start (menu Help -> Quick Start) to understand the different parts that make up Keyboard Maestro and how they work together, as well as to become familiar with the terminology used in Keyboard Maestro.
Keyboard Maestro has a very different philosophy to QuicKeys. Keyboard Maestro actions are designed to be orthogonal. The Repeat action does not prompt for the number of times to repeat - there is a Prompt For User Input action for that. The Move action doesn’t scan through the Finder’s selection - scanning through things in the job of the For Each action. There is no “For Each File in The Finder Selection” action (though there is a fake version of this in the Actions selector) - the Finder Selection is just one of a set of categories the For Each action can scan.
The result of this is that each part of Keyboard Maestro that you learn multiplies your previous abilities, while each individual action is kept simple and self contained.
Knowing this, it becomes obvious. I want to deal with the selected files - thats a group of things, so I’ll scan them with the For Each action, and in there is the category for the Finder’s selection. And I want to move them, so I use the Move action within that loop. What if instead, I want to act on the contents of a folder - that is just another collection. Or the paths are stored in the clipboard or in a text file. Just another collection. The Move File action doesn’t have to offer ever possible way of getting the source files. What if I want to delete them instead of moving them - just a different action in the For Each loop. What if I want to copy them to two different places. Or Move them and then open them. Just change the actions within the For Each loop.
This is how Keyboard Maestro gets its power. And despite your jarring observations which largely stem from Keyboard Maestro behaving differently to QuicKeys, this is how Keyboard Maestro maintains its simplicity - because each action does its one thing, and not the job of several other differ actions as well.
Thank you for your reply. I have no doubt of the power and flexibility of KM just from the short time I’ve played with it, I’m just a little surprised at how unintuitive a few things are. There was no indication that the “move file” action shouldn’t work by itself just like it is, and I searched the internet for half an hour before I could find how to make something work on the Finder selection, and still wasn’t convinced it was the right way.
These examples (along with changing the Finder label, the other one that caused me a little trouble) probably seem obvious to someone who knows the program well, but it took a frustratingly long time reading the help and searching the internet to find the answers, and don’t totally understand them once I got them. For instance, the “change Finder label” macro has no “for each…” but the move file macro looks almost the same yet requires one. (Under what circumstances would I want to use the “move file” without the “for each”?)
Thanks again, I will spend some more time with KM when I have a chance. I had started last night with the intent of just re-writing all my QK’s right then and switching over after 15 (20?) years, but it may take a little more research.
What are some of the QK actions you’re having trouble duplicating?
1 Like
I'm not sure which macro you are referring to? To change the Finder label (using the Third Part Set Finder Label action), you would do this:
To change the Finder Tags (Mavericks+), you would use:
To move the files to the Documents folder, you would do this:
Note the consistency between them. And note that you could do all three in a single For Each action if you wanted (you would have to ensure the Move was done last of course, as that will change the path to the file).
Most every time you are moving a single file. Such as the file open in Preview (which I personally use a lot for filing scans into specific folders or into Yojimbo with specific tags).
Certainly its not uncommon to want to iterate through the Finder's selection, which is why there is one of the very few "smart actions" in the Action selector for inserting For Each Path in Finder Selection:
I'm not saying that in the trivial case Quickeys way of doing this isn't easier, just that Keyboard Maestro does this with a different paradigm, which, while perhaps a bit jarring for a Quickeys user, and perhaps a bit more complex the very first time you see it, quickly becomes a source of power as you grasp that you can iterate through the Finder selection and then do anything you want, not just whatever single action you might choose.
2 Likes
Thanks for the explanation. I will have to explore more later when I get a chance.