Applescript not running on restart

on mac os 14.0 (23A344)
a macro containing applescript does not run on restart / cold boot.

strangely, i found that
if i manually open up applescript editor, and run any script once from Script Editor, then my KM macros containing applescript will run.

it sounds like something within applescript needs to be triggered to activate first.
what'd be a good workaround/solution?

Keyboard Maestro has a wake trigger, but no startup trigger. One way to run a script on startup is to save it as an applet and then add is as login item.

thanks for your explanation.
i've already tried to save a script as an app and put it in the startup.
unfortunately, the script runs, but does not have the same effect. KM macros containing applescript still do not run.

i'm just wondering how are others using running KM with applescript?

To clarify, are you trying to run a Keyboard Maestro macro on startup? If you're trying to trigger it via a login item applet and the macro fails, perhaps it's a timing issue? Perhaps you have to wait until the Keyboard Maestro Engine has started. In fact, as an alternative to applets, you can try the Keyboard Maestro Engine Launch Trigger.

let me try to clarify my situation.
i'm using KM to run a macro triggered by a certain hotkey

the trigger should execute an applescript
but that portion does not get executed on cold boot

if i open Script Editor app and manually run any script once
then my KM macros containing applescript will run.

nvm

found an error in my script
@noisneil thanks for your help

1 Like