How Do I Move the Resulting "Custom prompt with HTML text" Window with Variables

I would like to move the resulting "Custom prompt with HTML text" top of the window to 100 from the top and the right side of the window to -100 from the right of the main screen.

I'd like to have the option to set that position by using variables. ie. VarT = -100, VarR = -100

I use the macro "Floating Window - Screen Capture (ImageMagick) 1.2" to produce that window.
Thanx to @alain

This is the action that produces that window.

<head>

<script>
	document.write('<title>'+window.KeyboardMaestro.GetVariable( 'scfs_info' )+'</title>');
</script>

<script>
function KMWindow() {
	return window.KeyboardMaestro.GetVariable( 'scfs_dim' )
	}
</script>

<style>
html { 
	background:  no-repeat center center fixed; 
 	-webkit-background-size: contain;
 	margin: 0;
	padding: 0;
}

body {
	margin: 0;
	padding: 0;
}
</style>
</head>

<body>
&nbsp;

<script>
	document.documentElement.style.backgroundImage = "url('" + KeyboardMaestro.GetVariable( 'scfs_file' ) + "?" + Date.now() + "')";
</script>
</body>
</html>

I appreciate any feedback.

Open the Custom HTML Prompt Action help page, scroll down to the HTML Window Design section to find the trick using the body tag to position the window.

1 Like

Are you really sure about that @troy? The Y coordinate of the top of the screen is 0 so -100 takes you 100 pixels above the top - in other words off-screen. I suspect you really want the window 100 pixels below the top of the screen, so in that case just use the value 100.

2 Likes

Erg, yes.

100 from the top, and the right side of the window to -100 from the right of the screen.