How can I abort the whole macro, rather than the one mouse action? Is there a way to see if the macro is still running in some way? Or do I just deactivate it in KM and it stops?
When a macro is running the KM menu bar icon is animated. You can also go to the KM menu > Cancel. There you see if and which macro is running, and you can cancel it from there, too:
If nothing is running the submenu is dimmed. You can also cancel all macros by clicking the KM menu icon while holding down ⌃⌥⇧⌘.
I paste a new file into the folder, one time it works, the next 10 it doesn't.
At this point I really think it would be a good idea to read a bit the documentation and trying to get something more simple to run, step by step:
Did you manage to get my prototype macro to run? If Yes, good, if Not try to get it to run.
Then take the last version of your macro and disable all actions except the first ones. Does it run? If Yes, then enable the next action etc. When you get stuck, then insert some “debugging” messages:
For example if a file is not picked up, it may be that something with the variable is wrong. Then insert a “Display Text” action after the variable declaration, to show the content of the variable in question, like this:
Do the same for the %TriggerValue%
at the beginning of the macro. The Trigger Value should hold the name of the file you dropped into the watched folder.
If a mouse click or keystroke action fails, try it with a 3s pause instead of 0.5s. Also the Debugging mode may be helpful (see the KM menu screenshot above).
If something fails in general you’ll get a notification from the action in the top right corner of your screen. Read it, and when the text is truncated open Console.app in Applications/Utilities, filter for Keyboard Maestro and read the whole message there.
Also the engine.log may contain valuable information. You can open the log folder from within KM Editor, in the Help menu > Open Logs Folder.