How do you kill a messed-up Custom HTML Prompt?

I made a silly mistake with a Custom HTML Prompt action. I had it open some JavaScript, instead of the HTML it was supposed to open. This is what I got:

image

I couldn't figure out how to kill the prompt. The first time it happened (and yes, it happened multiple times before I figured out what was going wrong), I stopped the Engine, and even that didn't kill it. I had to find the KM process that displays Custom HTML Prompts and kill it manually.

Funny thing is, while I was typing this up, I wanted to get a screenshot of the prompt. When I moved the window behind it out of the way so that only the desktop was underneath the prompt, the prompt quit. That may have something to do with the fact the prompt is semi-transparent.

Anyway, other than that, does anyone know a way to kill a custom HTML prompt?

@peternlewis?

I see your window does not include the stoplight buttons (Red would do it). Alternately Cancel from the Keyboard Maestro menu bar would work. And even more appropriate for s panic, did you try Esc? I don't think ^W works without explicitly defining it in the header.

Just File ➤ Quit Engine, File ➤ Launch Engine.

1 Like
tell application "Keyboard Maestro Engine"
	close window 1
end tell

Of course, it may not be window 1, so you could just nuke 'em all:

tell application "Keyboard Maestro Engine"
	close every window
end tell

Or you could pick from a list:

tell application "Keyboard Maestro Engine"
	set theList to name of every window
	set theWinName to choose from list theList
	close (every window whose name is theWinName)
end tell
2 Likes

As I said previously, this did not work the first time. It left the process "Keyboard Maestro Engine Web Content" running. I had to force kill it.

1 Like

I have no idea how that would be. Unfortunately, that sounds like an Apple problem.

Yeah, yeah, blame it on someone else. :joy: Jusat kidding. I've actually had that process stick around before, but it happened most often when I did something really stupid which probably confused the process as much as it confused me.

1 Like

I recently had the same issue that I reported here:

In Activity Monitor, how would you find the Custom HTML Prompt? Is there something common to all Prompts that makes them easy to find?

In my case, I also felt that once the prompt crashed, Keyboard Maestro was no longer the one to blame or responsible to closing the window, but I couldn't figure out what to search for in Activity Monitor, so I just restarted the computer.

I think the problem will probably be solved if you shut down the engine a second time, and start it up again.

If not, make sure the engine is shut down, then kill this process:

image

Hope that helps.