Applescripts in KM, not responding

This is an issue with the scripts I have been creating, I had tried and tested them and not found a problem now running in keyboard maestro there is an issue.

One of the issues is which one is creating the issue?
I only know there is an issue from the mac slowing down and the activity monitor is not responding,


How can I help identify the issue. I added a timeout to specific script that I'm sure is the issue, but I still see it hanging.

Any Suggestions please?

In order for us to help you, we'll need a lot more information.
I run many AppleScripts every day, some from Script Debugger, some from KM, and I have to say I have never seen that issue in Activity Monitor.

Maybe your script is in an endless loop?

So, please upload your macro, or if it is not in a macro, then your script using a Code Block.

I do have one question: Are you using "osascript" directly? If so, why?

Then stop using the scripts, one by one, until you can isolate which one is causing the problem. I would probably stop all of them and then run each one individually.