How to change window size and location of "display text in window" action?

I tried the move and resize front window action but it does not work. This is (for me) a common recurrent issue and perhaps for others.

In some windows, I would like to display a few lines of formatted text. In others large annotated images that I use as a reference, for example my Better Touch Tool gesture map.

thanks in advance for your time and help

This does not work

Don't target the "Front Application" -- it doesn't "own" the "Display Text" window.

Instead target "the last engine window" (or use "the engine window with id..." if you don't want the most recently opened "Display Text" window).

1 Like

Works perfectly. Thanks very much !.

I would have a follow up question if you have the time.

I find it very tedious to try to guess the correct coordinates for the KM text window size and location.

There surely must exist a simple and straightforward way to do this.

thanks again

Coordinates I have to guess

Just an example: how would I determine the very approximate coordinates of the red box below on my computer screen.

I guess the easiest way would be to:

  1. Make a new Finder window
  2. Drag it to the position and size you want
  3. Switch to KM and create and run a macro with the following actions:
  4. Use the numbers displayed in the Resize dialog -- they're in the correct order already

That'll get you absolute positioning on whichever screen your frontmost Finder window is on.

1 Like

Hi @ronald - I produced a macro to do something very similar for a set of utilities I wrote a while back, so I took 5 minutes out to change it to work for you. The advantage of this macro is that it gives you a window to move and resize and then tells you its size/coordinates when you've finished. Just follow the on-screen prompt when you run it!

If you install it then you'll need to assign a hotkey trigger for it to suit you.

Here's the macro:
Window Position Tool.kmmacros (6.6 KB)

Click to see macro

Keyboard Maestro Export

2 Likes

great ! thanks very much. Saves me a lot of time and frustration.

I will use your macro which formalizes @Nige_S 's explanation, so thanks a lot ! Extremely useful for all my display windows and other windows I must resize

1 Like

@tiffle Can this be used to center the Prompt for user input window?

Don’t think so @noisneil but you could try this approach:

1 Like

Ahhh I actually knew that but thought it wasn't working. Dummy that I am, I was triggering the action, not the macro. Thanks for making me try again! :man_facepalming:t2:

1 Like

If you mean, how can you center the standard Keyboard Maestro Prompt for User Input window on the screen, that can be done like this:

1 Like

Actually, the basic Center option does it just fine. :+1:t3:

The reason I ended up using the above rather than just the basic center is because I have two screens. I found that sometimes the basic center put the the Prompt on the second screen (I think if it was the last to have some active window).

1 Like

I thiiiiiiink it depends which screen your mouse is on. Don't quote me.

Glad you didn't quote me!

:white_check_mark:

1 Like

Let's say that I have multiple KM Text Windows Displayed and I want to create a macro to close them all at once to avoid repeatedly clicking on OK

I tried close engine window, but none of the options work. I tried front window, window with title, title containing, title matching keyboard maestro - display text , but nothing works
The close window with id below also does not work

thanks very much

image

I actually asked this the other day and tried all the options people sent my way. I decided on this one as it's the snappiest:

In the Manipulate a Window action, select "Other" for the application. Now, in Finder, right-click on the Keyboard Maestro app, select Show Package Contents and find the Keyboard Maestro Engine:

Drag it to the dialog waiting for you in the KM Editor and hit ↡. Click the same dropdown again and select Match by Bundle ID. Done.

Note that if it is just to avoid clicking (and not because you want to make this part of a bigger macro) then you only need to click once to close all the "Display Text" windows -- just hold down the βŒ₯ key and click the Close button (top-left corner) of the front window.

Same as any other "proper" Mac app!

1 Like

You may have felt the earth tremble. It was me trying to follow your instructions (all my failure to understand, nothing to do with your excellent explanations)

Finder is my default browser

In Finder, no problem finding show package contents

In KM β†’ manipulate window β†’close β†’ the front window β†’ in β†’ other β†’ KM app β†’ context menu β†’ there is no show package contents.

thanks again

If you read my instructions again, you'll see I say "In Finder...".

1 Like

My profuse apologies. I am very sorry. You are obviously right, I read it incorrectly, perhaps because the procedure seems so foreign to me.
thanks VERY much

1 Like