I would like a macro that displayed an image (png) in a floating window above the active window. I know how to do this with text but not images. The image is currently stored locally on my hard drive. It's relatively small (334k)
I'd like to trigger this from the global palette but that's not critical.
If you need floating images regularly, I highly recommend a little tool called ScreenFloat.
It’s designed for floating screenshots but works with all kind of images.
In addition to the basic floating functionality it comes with very useful convenience features, like you can resize the floating window, closed windows are archived for easy access, and – most important – when you move the mouse over the floating window, it temporarily goes out of the way (optionally).
I've used ScreenFloat for years. I use it many times a day and love it. But, as far as I know, I can't recall or display a specific image with a keyboard shortfcut. I'll double-check but I don't think it's possible.
But, that's OK because I figured out how to do what I wanted with a KM macro. I posited the trivially simple macro on the KM site as a reply to my original post.
Thanks for the suggestion and I agree that ScreenFloat is a wonderful utility.
No, I don’t think it’s possible. What you can do, is:
assign a shortcut to call the Shots Browser
assign a shortcut to hide/show all images
So, it depends how many floats you usually have: If it’s only the one with the YouTube keys, then it would work fine (you can show/hide it with a single shortcut). If you have a couple of floats for different occasions, then you would have to call the Shots Browser and double-click an image there. (I.e., your macro with specific shortkeys is more convenient.)
This is easy enough to do, once you're familiar enough with Keyboard Maestro's actions.
You can skip the variables if you want to put the file path directly in the Read a File action. I used variables simply to demonstrate how to use them.
I set up a button on my Stream Desk to do a Display Named Clipboard action to show an image of the various layers on my mechanical keyboard to remind me which button does what on alternate layers.
But I didn't know how to make the pop up to go away easily. Then I hit on using an "If All Conditions Met Execute Actions" action. I have a variable for the window set to "No." So if the variable is "No" then I have not invoked the window, and the action displays the named clipboard and changes the variable to "Yes."
If the variable is "Yes," then the window is showing, so it goes to the else condition and hits "Esc," the windows goes away, and then the action changes the variable to "No."
So my Stream Desk button toggles the image for as long as I need. Hit the button again and it goes away.