Resize “Display Text in a Window” to Fit Pasted Image

Hi,

When I use Display Text in a Window and paste an image into the window, the window doesn’t automatically resize to fit the image.

Is there any way to have the window resize itself according to the pasted image size, or to control the window size dynamically based on the image dimensions?

If this isn’t currently possible, I’d like to request this as a feature.

Thanks!

Is your ultimate goal to display an image that is in the clipboard? If so, try the Display Clipboard Action.

Thank you for the suggestion. However, since the clipboard is constantly changing, I would prefer to use the "Display Text in a Window" action. My goal is to have the window automatically resize itself to fit the pasted image so that the content remains static even after the clipboard is updated.

That implies a "known" image that you can get the size of.

Use the "Set Next Engine Window" Action immediately before your "Display..." set the window to the correct size -- remember to add pixels to account for the window chrome and balance the inset from the left edge. For me that's 25 pixels to the horizontal (scroll bar plus inset) and 80 to the vertical (title bar and "OK" panel). So for a 621x584 image:

...to put the "Display" window's top-left corner 125 pixels in and down from the top-left corner of my display, sized to the image.

2 Likes