Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,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 2.71 / 5
  You rated: 1 / 5 (7 votes cast)
 
[16,981 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 whoever posted them. This site is not responsible for what they say.
Use Quick Look in Quicksilver
Authored by: jer2665 on Dec 10, '07 08:19:27AM

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 Dec 10, '07 09:41:08AM

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 Dec 11, '07 12:01:02PM

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 Dec 25, '07 09:23:06AM

I also get this error behaviour. Any solution yet?



[ Reply to This | # ]
Use Quick Look in Quicksilver
Authored by: _tom_ on Dec 25, '07 10:08:53AM

Never mind I forgot to compile the script.



[ Reply to This | # ]
Use Quick Look in Quicksilver
Authored by: kohlmannj on Dec 10, '07 04:20:57PM

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 Dec 10, '07 04:32:00PM

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 Dec 10, '07 04:35:42PM

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 Dec 10, '07 04:33:08PM

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 Dec 10, '07 05:39:56PM

Awesome! Is there a way to close the window without the mouse?



[ Reply to This | # ]
Use Quick Look in Quicksilver
Authored by: immensewok on Dec 10, '07 05:50:39PM

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 Dec 10, '07 08:16:29PM

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 Dec 27, '07 09:59:18PM
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 Jan 12, '08 04:01:30PM

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 Sep 01, '08 03:07:08PM
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 | # ]