Why Did My Macro Stopped Working Properly?

Download: _Perform Audio Analysis and Processing Ver. 3.kmmacros (40 KB)

For some unknown reason my macro process stopped working as before. I have no idea why but this macro was running everything start to finish without any issues and today it suddenly stopped performing the tasks.

I also noted the issue with another macro as well.

The noted issues with this one is that it suddenly never triggers when a file is dropped into the designated directory.

If I manually run the macro, it launches the YLM app but defaults with a browse dialog (at the desktop location) that I have to manually point and select the file in the trigger directory. Which I suppose makes sense b/c the trigger value isn't acquired at this point.

After that it goes through to the Clean Up OCR step and just stops.

I'm confused b/c I tested this several times over and all this was working just fine. I have no idea why the sudden behavior.

My other macro is also stopping midway through the process and it was also working without issue.

Any ideas or suggestions as to what may have triggered the issue?

I did search the forum and found the folder trigger issue has been reported quite frequently but I haven't found a definitive solution.

9 times out of 10, any issue (not just KM) relating to a mounted volume is because there's been a disconnect and remount -- when that happens the volume is often remounted at a different path, the volume name with a number appended, and the original path no longer works.

Check in Terminal with ls -l /Volumes and you'll probably find an ATOM G-T3-1 directory -- the new, and current, mount point.

Restart your Mac and everything should be fixed.

Interestingly, I don't see any indication that anything has potentially changed; and more specifically with the ATOM volume, but I did already try rebooting the system prior to the post to see if it resolved the problem and it didn't. :face_exhaling:

ls -l /Volumes
total 320
dr-xr-xr-x@ 11 root wheel 352 Apr 24 09:50 ATOM G-T3
drwxrwxrwx@ 1 mark staff 16384 Apr 26 16:39 JAGAPE
lrwxr-xr-x 1 root wheel 1 Apr 27 11:12 Macintosh HD -> /
drwxrwxrwx 1 mark staff 131072 Dec 31 1979 SAMSUNGKEYS

Then it's the 1 time in 10 and you'll need to resort to standard OS/KM troubleshooting.

First off, what's changed since when they were last working and now? Not just OS and app updates -- have you moved the macros into different Macro Groups, or changed the Group's activation criteria? Note that a macro in a disabled or inactive Group still runs when you click KME's "Run" button.

What's the common factor for all the macros that have stopped working?

Does the macro trigger when you drop a file into the folder? Either check the Engine log (available via KM's Help->Open Logs Folder) or add a "System Beep" action at the very beginning of the macro you posted for an audible notification.

If it isn't firing, try deleting and re-adding the trigger.

Have you tried KM's "Interactive Help" from the Help menu? It really is very good.

This was the very first question I asked myself since it's the most obvious to consider, but aside from things totally unrelated to KM absolutely nothing changed. I installed a couple of new audio plugins, however no system update changes or anything else. Even the directory structure that KM is referencing has remained unchanged from the time is was actually working.

Not being sarcastic, but the common factor is that they're all using the KM engine.

No, absolutely nothing

Thanks for the suggestion. I examined the log and the only thing that got recorded was me manually running the macro. Trigger wasn't being recorded anywhere.

So I cleared the log and restarted KM again to see if the trigger would fire. Nada. The only entry in the log after several attempts dropping files in the folder.

2023-04-27 15:59:58 Engine Starting 10.2

Tried that as well... nothing

I haven't but I suppose I'll venture that path next since nothing else is working. I totally don't get why it would simply stop without rhyme or reason. Makes no sense after weeks of getting assistance to get everything in place and working. :face_with_diagonal_mouth:

On a similar note, is there any particular reason why the trigger is requiring the app to be upfront to work? I don't believe it has anything to do with the current issue since it has been like that from the beginning and hasn't been an issue.

But if this is a Folder trigger, I don't understand why having my app upfront would be a requirement for the trigger; and I don't see any way for me to control that setting either since enabling the trigger automatically places a check in that box along with the requirement in parenthesis.

UPDATE: Nevermind, I found where that parameter is being set. Disregard this question.

So have all your macro triggers stopped working (hot keys, periodic, watched folders, etc) or is it just the watched folder macros? While I get that KM Engine is the common factor, it's also what runs the macro when you fire it manually -- so look for something common in the macros that don't trigger and differences with the ones that do.

You've found the parameter you changed, but make sure that there's nothing else in that Macro Group's settings that might be making the macros in it inactive. A double-check would be to (temporarily) move the failing macro into the Global Macro group and see if it works -- if so, that narrows it down to your Group settings. The Interactive Help will flag up such issues too.

Thanks @Nige_S
I'd already marked your suggestions as the Solution but thanks for the additional comments.

The issue was resolved using the Interactive Help; in addition to once I'd identified where the "(when Logic Pro is at front)" value was being set; I changed it so the hotkey would not be restricted to Logic and things began working again as they were before.

I know I will have to determine the best scope to set for this as opposed to unrestricted but as long as it works as before; it's good enough for the time being.

The unsolved mystery to me would now be "why" it was previously working when Logic Pro was the set scope during the entire time I was building and testing it; then suddenly it didn't any longer work until I removed that scope.

But I don't really have luxury of time to target answering that question. For me, it more important that it simply works now.

Thanks again

Do you need to scope it? It may be that you want to have different macros firing depending on which app was active (and therefore, presumably, putting things into that folder) but, personally, I'd do that by having the "watching" macro always active but making its behaviour conditional on state -- that way I'd know it always fired, could catch any "odd" additions and throw a notification, etc.

If it always fires when something is added to that folder, that's one potential point of failure removed from your workflow.