Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!

10.5: Use Quick Look in Quicksilver Apps
Quicksilver, from BlackTree, is a handy tool to launch/browse apps/files, and with Leopard, it would be ideal if we could activate Quick Look on a file selected in Quicksilver. It turns out to be a fairly easy task to add this feature.

First create this shell script and save it as ~/bin/ql (remember to make it executable with chmod a+x ~/bin/ql):
#!/bin/bash
qlmanage -p "$@" >& /dev/null &
Next create the following AppleScript, and save it as QuickLook.scpt in ~/Library » Application Support » Quicksilver » Actions:
on open of theFile
  set thePath to quoted form of POSIX path of theFile
  do shell script "~/bin/ql " & thePath
  tell application Quicksilver to hide
end open
Then quit and restart Quicksilver. Now whenever you select a file, you can choose a newly-added action named QuickLook to have a quick peek at the file.

[robg adds: I haven't tested this one...]
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[11,282 views]  

10.5: Use Quick Look in Quicksilver | 15 comments | Create New Account
Click here to return to the '10.5: Use Quick Look in Quicksilver' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Use Quick Look in Quicksilver
Authored by: jer2665 on Mon, Dec 10 2007 at 8:19AM PST
Pretty neat, script works a little different than normal quicklook, but displays a box that looks similar (though a little less responsive), could prove to be useful.

[ Reply to This | # ]
Use Quick Look in Quicksilver
Authored by: jgarbers on Mon, Dec 10 2007 at 9:41AM PST
Hmm... not working for me here... the 'ql' script works (I can invoke it from a command line) but invoking it via the AppleScript and Quicksilver does nothing at all. I do see a console message from Quicksilver that says "no handler". I did restart QS per the instructions, and the "QuickLook" script is indeed appearing in QS as an action. Anybody have a suggested fix?

[ Reply to This | # ]
Same error
Authored by: weitzman on Tue, Dec 11 2007 at 12:01PM PST
I get the same behavior and same error in Console. It works from the .sh script and from the applescript. Help.

[ Reply to This | # ]
Use Quick Look in Quicksilver
Authored by: _tom_ on Tue, Dec 25 2007 at 9:23AM PST
I also get this error behaviour. Any solution yet?

[ Reply to This | # ]
Use Quick Look in Quicksilver
Authored by: _tom_ on Tue, Dec 25 2007 at 10:08AM PST
Never mind I forgot to compile the script.

[ Reply to This | # ]
Use Quick Look in Quicksilver
Authored by: kohlmannj on Mon, Dec 10 2007 at 4:20PM PST
Awesome, thanks very much. Slightly stupid, but I simply saved "ql" in my /bin directory rather than my nonexistent ~/bin directory.

[ Reply to This | # ]
Use Quick Look in Quicksilver
Authored by: gabrielito on Mon, Dec 10 2007 at 4:32PM PST
Hmm...

Not really confortable in creating a shell script, could anyone help?

How do you create the shell script? With a texteditor like textmate? I tried also with pico in Terminal, but when I save the script, it looks like a text document, not as a shell script?!?

Another question: I don't have any ~/bin folder in my home directory. Only a /bin at the root of my HD. Do I have to create this folder in my home directory or do I use the one at the root?

Thank you for your help! Would love to try this feature!!!

Gabriel

[ Reply to This | # ]
Use Quick Look in Quicksilver
Authored by: gabrielito on Mon, Dec 10 2007 at 4:35PM PST
Sorry I posted it at the wrong place :-(

I posted it again in the usual flow of comments... but can't trash this one?!?

[ Reply to This | # ]
Use Quick Look in Quicksilver
Authored by: gabrielito on Mon, Dec 10 2007 at 4:33PM PST
Hmm...

Not really confortable in creating a shell script, could anyone help?

How do you create the shell script? With a texteditor like textmate? I tried also with pico in Terminal, but when I save the script, it looks like a text document, not as a shell script?!?

Another question: I don't have any ~/bin folder in my home directory. Only a /bin at the root of my HD. Do I have to create this folder in my home directory or do I use the one at the root?

Thank you for your help! Would love to try this feature!!!

Gabriel

[ Reply to This | # ]
Use Quick Look in Quicksilver
Authored by: immensewok on Mon, Dec 10 2007 at 5:39PM PST
Awesome! Is there a way to close the window without the mouse?

[ Reply to This | # ]
Use Quick Look in Quicksilver
Authored by: immensewok on Mon, Dec 10 2007 at 5:50PM PST
In QS, in the first pane type "killall qlmanage" and in the second pane use "Run Command in Shell." Save it as a trigger and pick a hotkey. Esc & space don't seem to work though.

[ Reply to This | # ]
Use Quick Look in Quicksilver
Authored by: beanboyrjs on Mon, Dec 10 2007 at 8:16PM PST
Nice! I was just wishing for this a couple of days ago. Thanks.

[ Reply to This | # ]
10.5: Use Quick Look in Quicksilver
Authored by: some0ne on Thu, Dec 27 2007 at 9:59PM PST
why create a shell script? I just invoke qlmanage directly:
on open of theFile
	set thePath to quoted form of POSIX path of theFile
	do shell script "qlmanage -p " & thePath
	tell application Quicksilver to hide
end open


[ Reply to This | # ]
10.5: Use Quick Look in Quicksilver
Authored by: gabrielito on Sat, Jan 12 2008 at 4:01PM PST
OK. With some0ne's hint, avoiding the shell script, I could make it work.

That's a first step. But the problem is that when the quicklook window opens, you loose control of Quicksilver (it hides) and can't use your spacebar to close the quicklook window.

What would be GREAT would be to invoke this quicklook script in quicksilver, press space-bar like in Finder to open the quicklook, then press space bar again to close it and come back right inside quicksilver where we left it...

Someone think this would be possible? :-)

[ Reply to This | # ]
10.5: Use Quick Look in Quicksilver
Authored by: Sesquipedalian on Mon, Sep 1 2008 at 3:07PM PDT
If you want a way to do this that will let you use the full functionality of Quick Look, save the following as an action in Quicksilver's Actions folder.

on open these_items
	tell application "Finder"
		activate
		select these_items
		tell application "System Events" to key code 49
	end tell
end open
This will show the files in a Finder window and automatically open a Quick Look window for them. This gives the full functionality of Quick Look, but it does mean that you end up with a Finder window left open afterwards.

[ Reply to This | # ]