Open an image with Quick Look not Preview

I want to briefly see an image using Quick Look (I think that's what it's called, the popup window that comes up on pressing space)

Possible?

This might be helpful:

http://hints.macworld.com/article.php?story=20100712090451517

Hey @forums2012,

Is what possible?

Quick Look works fine in a variety of places.

Your question lacks necessary details and context. Please elucidate.

-Chris

Oops sorry.
I check if file name exists then I show a prompt saying file already exists, Do you want to see the file?

Then I used the "open file using default application" action in KM.
But I want to be able to view it as a quick look thing rather than opening preview.

Hey @forums2012,

Where are you doing this? In the Finder or elsewhere?

-Chris

I am doing this from a prompt for user input.
The application running behind is usually Pages

Hey @forums2012,

Well... You're not going to get from a KM User-Input Prompt to Quick Look, but something like this could work.

The macro needs at least 1 file on the Desktop for the demonstration.

Run the macro, and manually hit the spacebar after the choose file dialog comes up.

If you hit Return in the dialog a POSIX Path to the selected file will be returned.

Of course all kinds of customization is possible.

-Chris

Quick Look a File Using the Choose File Dialog.kmmacros (5.8 KB)

2 Likes

Thanks a lot!

This script does not seem to work on Sequoia. How can. I make it work?

I had to go to the internet archive to find that hint, which is ironic as that was the site I founded and ran for many years :). It refers to qlmanage, which very much still works in Sequoia, so what are the exact issues you're having with it? And if it involves a macro, please post the macro.

-rob.

Here is the macro:
Quick Look file.kmmacros (21.2 KB)

Found the issue - not sure why it happens.

If I use a file name Test it works

If I use file named Test Test - it does not
it does not help if I use it in "/Users/borborygmus/Downloads/Test Test.rtf" or "/Users/borborygmus/Downloads/Test\ Test.rtf" format

For some reason the space in the name prevents this command from working.

Also is there a way to make the quick preview window to disappear (similar to quick look) by pressing a space bar after viewing a quick look in this setting?

It works fine for me either way, though it you use the backslash, you do not use the quotes. I created a file named Test Test.rtf, just to be sure, but it worked fine.

The problem is the QuickLook window opens in the background, so you can't use the space key because it gets sent to the frontmost window. I have a couple macros that call qlmanage to preview image files with my mouse, and they both open the preview window in the foreground; I can't explain why this one doesn't do that.

-rob.

1 Like

Quick Look Alfred.kmmacros (3.6 KB)

It opens the preview behind all windows. Trying to bring it upfront does not work. Also using space bar click does not quit the window/app.