"At login" and "At engine launch" triggers not working

Hello!

I'm trying to create a macro to launch an app at login (and eventually also run a macro in that app).

I'm running 10.2 on MacOS Ventura 13.5.1

I've used the interactive helper wizard and it doesn't show any issues.
I've tried to change the action performed and nothing seems to work.
I've restarted KeyboardMaestro and my system.
I've toggled permissions for both the app and the engine, turning them off and on again.
Running the macro with the button in the app does work.

Still nothing – grateful for any suggestions.
Thanks!

Post your actual macro so we can have a look. :+1:t3:

1 Like

Hey there, welcome to the forum!

Make sure that the macro is in a group that is enabled and globally available. Also, you can place an alert at the beginning of the macro to show what triggered it. I’ve included a screenshot and the action itself of the one I frequently use while debugging.

Beyond that, as @noisneil mentioned, please post the actual macro so we can see what you’re working with. Because without seeing the macro, we’re just guessing, and I’m sure we all have things we’d rather be doing on a lazy Sunday than that, yourself included. :wink:

Download → Show Trigger Alert.kmactions (640 Bytes)

Action Screenshot (click to expand/collapse)

1 Like

If "running the macro with the Run button in the KM Editor" does work, as you say, then my guess is that it's a timing issue, wherein your macro doesn't wait during the launch of the app to reach the point where it can respond to your macro. If my guess is correct, then a Pause action is all you will need to fix this. But I'm just guessing, without being able to see your macro.

1 Like

Thanks for the quick replies!

Here's a screenshot of the macro. Sorry for not including it to begin with, I'm new to this!

@Airy – I considered that and tried adding a 1.5s delay, which didn't seem to help. Thanks for the suggestion though!

Thanks guys

Thanks for the suggestion!

I posted a screenshot in my previous comment, but just realised now that I can share the actual macro as a file. I've added it here.

I added the Show Trigger Alert, and it does not seem to be triggered at login. It does show up when running the macro manually using the "Run" button though.

Open Session at Login V2.kmmacros (2.1 KB)

In your original post you said, "and eventually also run a macro in that app" but you didn't show that part of your macro in this macro. All you showed was launching the app. In any case, when it comes to launching apps, I always do it more like this, which is even better than including a PAUSE action.

image

Why not add Messages to your Login Items? Then you can simply pause until it's running before activating it and continuing your macro.

I did, and that's what I'd eventually like to do – but I'd figured to keep things simple I'd try to isolate the problem first.

Thanks for the suggestion, I'll try to replicate it!

I empathize, but in order to fix a problem with a macro, we need to see the macro that doesn't work, not a macro that does work. :slight_smile:

Good idea, but the amount of code wouldn't change much. In addition, I just used "Messages" as an example, since I don't have the app he's using.

Right, but the macro that I posted earlier (added it to this comment as well) does not work. I'm just trying to get the session app to launch when I log in and it doesn't. I figure once I have that going, I'll add the macro I already have functioning as an action in this macro. Thanks for the help.

Open Session at Login V2.kmmacros (2.1 KB)

I assumed you were replying to @Airy at first.

I hadn't thought of that, and tried to add Session to my Login Items now. Interestingly, it doesn't seem to work there either. I can find the app and select "Open", but it doesn't show up in the list of Login Items.

Maybe this is a clue to as to what's going wrong?

I tested your macro and it worked well for me. I had to change the app name because I don't have an app called Session. As the sign says in a local car repair shop, I can't fix something if it isn't broken. I need to see something that doesn't work to be able to fix it.

I'll let noisneil reply to your comment to him, but I think you misunderstood him.

What is "Session"? Is it actually an application?

If so have you checked its preferences for a "Launch at startup" option (or similar)?

Can you right-click it's dock icon and select Options > Open at Login?

Huh, maybe that suggests I need to give KM some additional permissions?

I've tried using the macro to launch other apps and activate other actions, which doesn't work. That tells me there's an issue with the At Login trigger, but I'm a total newbie so I could be wrong.

Thanks for the help anyway.

If there was something wrong with the At Login trigger, then it wouldn't work for me either. Right? But it works for me.

I think you should try the other idea, which I didn't see you acknowledge. I shouldn't speak for other people, but I think someone wanted you to right click on the "Sessions" program in the Dock, move the mouse over "Options" click/enable the option called "Open at Login." Once you've done that, report back if "Sessions" launches the program at login. If it does, then your macro doesn't need to launch the program anymore, right? If this doesn't work, there is a problem with something on your Mac, but if it does work, then you've solved your problem.

Yeah, it's just a time tracking/pomodoro app.

Launch at login is already enabled in the Session app settings.

I selected Open at Login from the dock icon. Did not make a difference.

My guess is that this doesn't have anything to do with the particular app I'm trying to launch, as I've tried launching other apps, as well as @cdthomer's suggestion of the "Show Trigger Alert" action. These also haven't worked.

Thanks

I don't know if that's right. Seems to me that the At Login trigger not triggering any action suggests that there is something wrong with the At Login trigger. It working on your end, but not on mine, suggests that there's some setting I may have to change within KM, or give it some additional permission or something.
This was my hypothesis before I made the original post here, and I looked through the forums with that in mind but couldn't find anything that helped, so I made this post.

In either case, I've selected Open at Login from the dock icon, per @noisneil's suggestion. This doesn't seem to work, Session does not open when I log in.

Just to make sure – when I say "log in" I'm talking about logging in from the logged out state I enter when I press the power/Touch ID button on my mac. I'm not talking about logging in from having fully shut off my computer. Maybe that's the issue, and I've just misunderstood what's meant by "Login"

Thanks for the help.

It might be worth playing around with the Wake Trigger instead then.