Highlight Function Questions/Suggestions

In KM 10.0.1

Regarding the Highlight function, can we do the following, or can we add it to the wish list?

  • Change the color of the outline, and thickness of the line?
  • Change the color inside the box?
  • Change the opacity of the outline and inside?
  • Display text inside the box, and Change the text color/opacity?
  • Instead of a number of seconds, use a condition builder like the Pause Until function?
  • Run it Asynchronously natively in the function, without running it separate macro wrapper?
  • Can we name the highlight element drawn to the screen? This name could be used later to edit, replace, or delete the highlight object.

Keyboard Maestro Actions.kmactions (1.3 KB)

Although I agree with some of your ideas, the above idea is far less useful that having a new "Group Action", perhaps called "Asynchronous Group" which runs any enclosed actions asynchronously from the main macro (but still in sequence for its internal actions.) This would save Peter from having to add this feature to this action or to any other action (eg, the Speak command, which also needs this feature.) Instead, a single new action can create this asynchronicity. (Is that a word? The macOS spell checker says it isn't. But if Shakespeare can coin new words, so can I.)

@peternlewis – please note.

Maybe.

What color/opacity “inside”?

Probably not.

Note that in Keyboard Maestro 10, you can do all of this in the Custom HTML Prompt action.

image

2 Likes

Holy cow that's what I'm look'n for! Can you post the sample script you used to make that screenshot?

I look forward to an answer too. I used to know how to do this. I think there are two totally different approaches to solving this using Custom HTML Prompt. One approach is using JavaScript, and the other is using HTML5. There are several websites online that teach you how to do this using HTML5. The one I used last was here. One of their subpages, I recall, illustrates the code for what you want to do. (Search for the arc() function on their site.)

1 Like

It’s just a transparent Custom HTML Prompt action with simple CSS. Using an HTML Canvas would be better still.

Custom HTML Prompt.kmactions (1.3 KB)

Keyboard Maestro Export

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8" />
	<title>Keyboard Maestro Form Example Circle</title>
	<style type="text/css">

body {
	background-color: #DBE8F900;
	color: #5A698B;
	width: 420px;
	margin: 0;
}


.circle {
    background-color: #0080FF80;
    border: solid 5px #FF0000C0;
    height: 100px;
    width: 100px;
    border-radius: 50%;
}

	</style> 
</head>
<body data-kmwindow="SCREEN(Main,Left,20%),SCREEN(Main,Top,20%),420,640">
<div class="circle"></div>
<p>
<a href="https://www.stairways.com/main/" onclick="window.KeyboardMaestro.Cancel('Cancel')">CLOSE</a>
</p>
<script>

</script>
</body>
</html>
2 Likes