Automator timeout calling KM macros via Applescript

When calling a KM macro using automator’s Run Applescript action, you need to be careful to ensure that the action returns within 120 seconds, otherwise Automator reports a timeout error. I can’t see any way to fix Automator to wait forever (perhaps I didn’t search hard enough). So my solution will be to have the macro send a signal to another macro to run whatever code I need.

Unless someone can find a decent way to control Dictation Commands from KM, I will use Automator for that purpose.

“KM is to Automator what Perl is to Shell.”

Perhaps use AppleScript’s with timeout?

    with timeout of 3600 seconds
        do script "whatever"
    end timeout

I don’t know if that resolves it in Automator.

I would have bet heavily against your idea working, but I’m testing it and it’s been 3 minutes already and it hasn’t timed out yet. I’m floored. Are you some sort of wizard?

1 Like

AppleEvents time out after two minutes by default I think, so that’s probably what is happening.