problems with current selection and "send to quicksilver" under snow leopard

118 views
Skip to first unread message

Spike

unread,
Mar 24, 2010, 11:08:57 PM3/24/10
to Blacktree: Quicksilver
Hi,

I'm on SL 10.6.2

I'm aware of the problems with SL and I've tried everything I could
find, including installing b57, changing the prefs, and then
reinstalling b54 which most people seem to be sticking with. I've also
tried b58. I've tried the "Use front application rather than finder"
solution, I've cleaned my prefs and cache. I've read about people
having problems with Cmd-Esc and tried a different hotkey. I have
proxy objects Enabled.

In none of the combinations I've tried I've ever got a "send to
quicksilver" in the services menu, and yes I've read about the
problems on the github page about qs not registering and made sure I
had no other quicksilver around and emptied my trash. No Joy.

With the current setup I have, b54 with pref edited previously with
b57 I've managed to get the "command window in text mode" to work,
which at least allows me to create notes. This won't work on b57 or
b58. Current selection is completely broken, even if I type it rather
than using the trigger I hear an error system sound. I see some errors
in consoles, but nothing shows up when I press those keys, they seem
to be related to other actions.

On b58 I cannot ever get the "command window in text mode" to work,
but at some point I had current selection to work *with applications*.
It never worked with selected text.

I'm more than happy to get my hands dirty and run things in a debugger
with Xcode etc, but I'll need some directions because I've never done
development under Mac.

thanks for QS, despite the problems it rocks.

Rob McBroom

unread,
Mar 25, 2010, 9:03:49 AM3/25/10
to blacktree-...@googlegroups.com
On Mar 24, 2010, at 11:08 PM, Spike wrote:

> In none of the combinations I've tried I've ever got a "send to
> quicksilver" in the services menu, and yes I've read about the
> problems on the github page about qs not registering and made sure I
> had no other quicksilver around and emptied my trash. No Joy.

I think what you’re looking for on the menu is “Get Current Selection (Internal)”. If it’s not showing up when you have text selected, maybe try rebuilding the Launch Services database with this command:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

Note that warnings about applications downloaded from a web site will return after you do this.

Can you use the ⌘G method to get the selection?

--
Rob McBroom
<http://www.skurfer.com/>

Elastic Threads

unread,
Mar 25, 2010, 4:23:06 PM3/25/10
to Blacktree: Quicksilver
I posted this same solution elsewhere in the Groups, you should search
before posting.

I've written an applescript which sends your current selection in just
about any application to QS. I haven't missed the old QS function
since switching the script. Meanwhile the script works every time,
solidly, immediately, and I can slim my catalog down/speed it up by
turning off Proxy Objects.

You can grab the script, qsGetSel, here:
http://is.gd/aZ9wQ

Unzip it, move it to "~/Library/Scripts/" (where "~" is your home
folder), restart QS, activate QS, type qsGetSel and it should come
up, tab over, and type till you see "run" that should work.

set that up as a trigger and you should be good.

Paul Kohut

unread,
Mar 26, 2010, 5:27:02 AM3/26/10
to Blacktree: Quicksilver
A link to the post would be helpful.

Elastic Threads

unread,
Mar 26, 2010, 4:37:26 PM3/26/10
to Blacktree: Quicksilver

Jon Stovell (a.k.a. Sesquipedalian)

unread,
Mar 26, 2010, 5:29:45 PM3/26/10
to Blacktree: Quicksilver
Did you open Services Preferences (you can get to this easily from the
Services menu) and use that to configure the Send to Quicksilver
service? The option in QS's own preferences to set an alternate
Services Menu keyboard shortcut doesn't work on 10.6 (at least, not
for me); you have to use System Preferences to configure QS's
services. In there, under the Pictures section of your Services
preferences (why they are there I have no idea) you will find two
services provided by QS: Get Current Selection (Internal) and Send to
Quicksilver. By default, the first will be activated and have the
shortcut Cmd-Esc assigned to it (using the three letters "Esc" instead
of the normal circle-with-an-arrow-breaking-out-of-it symbol to
represent the Escape key). You can use either of these services (they
do exactly the same thing), but you'll need to add a new keyboard
shortcut to whichever one you choose. The System Preferences GUI won't
allow you to use the Escape key here for some reason, so you'll have
to use another combination unless you want to use a more geeky method
of editing this value.

Doing this is how I got the service working on both of my 10.6
machines after discovering that the Current Selection proxy, etc., no
longer worked. Plus, it has the added benefit that it will launch QS
if it is not already running, which is quite helpful if QS ever
happens to crash.

Jon Stovell (a.k.a. Sesquipedalian)

unread,
Mar 26, 2010, 5:35:47 PM3/26/10
to Blacktree: Quicksilver
P.S.: For that geeky method, see http://groups.google.com/group/blacktree-quicksilver/msg/54a863468874f364

On Mar 26, 5:29 pm, "Jon Stovell (a.k.a. Sesquipedalian)"

khiita

unread,
Mar 26, 2010, 9:08:53 PM3/26/10
to Blacktree: Quicksilver
Is there any reason why "Get Current Selection" won't work in Google
Chrome? I've tried it in Safari and in various text editing
applications and it works fine, but it won't work for Chrome. I've
tried using both Quicksilver's default trigger for getting current
selection and the services preferences keyboard shortcut, and neither
of them work. Elastic Thread's script will work, however. It's really
weird.

Jon Stovell (a.k.a. Sesquipedalian)

unread,
Mar 27, 2010, 1:11:02 PM3/27/10
to Blacktree: Quicksilver
Does Chrome support services? More precisely, does the services menu
appear in Chrome's application menu?

khiita

unread,
Mar 27, 2010, 1:23:52 PM3/27/10
to Blacktree: Quicksilver
The services menu does appear, but the only item is 'No Services
Apply'. Can you clarify for me if Quicksilver's 'Get Current
Selection' option works via its own code or by using OS X's current
selection option? If it's the latter, it's probably that Chrome has
included the services functionality.

On Mar 27, 12:11 pm, "Jon Stovell (a.k.a. Sesquipedalian)"

khiita

unread,
Mar 27, 2010, 1:28:54 PM3/27/10
to Blacktree: Quicksilver
Okay, yeah. I checked on Chrome's open issues forum and there's no
support for the services menu. I guess we'll just have to wait until
one of the Chrome devs picks up that issue.

Elastic Threads

unread,
Mar 28, 2010, 1:31:52 AM3/28/10
to Blacktree: Quicksilver
If you're a chrome user, the script I wrote qsGetSel, will send a
selection in Chrome to Quicksilver.
http://groups.google.com/group/blacktree-quicksilver/msg/d1f6b929816baf7f

Spike Spiegel

unread,
Apr 2, 2010, 7:28:33 AM4/2/10
to blacktree-...@googlegroups.com
On Thu, Mar 25, 2010 at 8:23 PM, Elastic Threads
<elastic...@gmail.com> wrote:
> I posted this same solution elsewhere in the Groups, you should search
> before posting.

apologies, I did search for long (the description of the things I
tried should hint at that), but did not come across your post.

> I've written an applescript which sends your current selection in just
> about any application to QS. I haven't missed the old QS function
> since switching the script. Meanwhile the script works every time,
> solidly, immediately, and I can slim my catalog down/speed it up by
> turning off Proxy Objects.

thank you very much for your work, this script is very helpful.
Unfortunately it doesn't address my main use case with URLs. if I
select anything of the form proto://path/to/file and run qsGetSel the
text will br truncated to the : . This is really not dependent on
urls, I can reproduce with any test, for example foo:bar:baz ->
qsGetSel will bring up QS window with "baz" only. Unfortunately I
don't really know much about applescript, but looking at the code it
seems to be due to something in the klChar functions. If I paste after
running qsGetSel I get the whole string, so the part getting data from
the clipboard is working fine, hence the guess that something is
happening inside klChar. The code in there seems to be trimming
leading and trailing spaces so I'm not really sure why the ":" is
causing a problem.

thank you very much for your help.

Spike

--
"Behind every great man there's a great backpack" - B.

Spike Spiegel

unread,
Apr 2, 2010, 7:31:54 AM4/2/10
to blacktree-...@googlegroups.com
On Fri, Mar 26, 2010 at 9:29 PM, Jon Stovell (a.k.a. Sesquipedalian)
<jonst...@gmail.com> wrote:
Jon,

> Doing this is how I got the service working on both of my 10.6
> machines after discovering that the Current Selection proxy, etc., no
> longer worked. Plus, it has the added benefit that it will launch QS
> if it is not already running, which is quite helpful if QS ever
> happens to crash.

thank you very much, this works fine everywhere, but not in firefox
(and in chrome for problems highlighted in this thread that are solved
by elastic's gsGetSel script, which I'd be inclined to use if the
problem with the ":" was solved.). Does it work for you in firefox?
It's kinda odd, I see the qs window opening but then it closes
immediately. In the fraction of a second that it's open for I can even
see that it did select/send the correct text, so I've no idea why it's
quitting immediately. Any thought?

thanks

Spike Spiegel

unread,
Apr 2, 2010, 7:47:37 AM4/2/10
to blacktree-...@googlegroups.com
On Fri, Apr 2, 2010 at 12:28 PM, Spike Spiegel <fsm...@gmail.com> wrote:
[cut all]

sorry for another post, I but I realised I missed something important.
If I use the qsGetSel script, how am I supposed to make *one single*
trigger that runs an action against the selection? I can see how I can
make a trigger that runs qsGetSel, but then I'd have to type something
else to run whatever action against that text, no? I don't see a way
in triggers to chain actions. What I'm after is a way to select a url
and say hit Cmd-1 and get it open in Firefox or Cmd-2 and get it open
in Chrome.

thank you again.

Elastic Threads

unread,
Apr 4, 2010, 11:35:52 PM4/4/10
to Blacktree: Quicksilver
@Spike,
It sounds like you actually want something different than a
getSelection. you want a getSelection + immediately do something.
Which also fine.

The colon problem with qsGetSel should be fixed. Download link is the
same as before, which is this: http://is.gd/beTm2

qsGetSel and the two services are both meant for much more than just
selecting a URL and sending it to a specific browser to be opened.
There is not way to specify a trigger to what your talking about. At
least as far as I know.

However, you could easily alter qsGetSel to make qsGetURL2Firefox and
qsGetURL2Chrome, that is, make custom scripts that do exactly what
you're talking about. And then set a separate trigger (cmd-1 and 2 in
your examples) for each.

Ok, well that was easy. Here's a generic script for grabbing whatever
text you have selecting and attempting to have a specified browser
open that text as a URL. if the text does not start with "http://"
then that is added to the selected text before sending to the browser.
Download the script, qsSelectionToBrowswer here: http://is.gd/beTnR

then double click it to open it with AppleScript Editor. Look at the
first line of script:

property myBrowser : "Safari"

change Safari to whatever browser you prefer to have the script open
the selected URL in. for Chrome make sure you use "Google Chrome".

So to get what you want:
Download qsSelectionToBrowser.
Duplicate it so you have two copies.
Open them both in Applescript Editor.
Change property myBrowser in one to "Firefox" and the other to "Google
Chrome" (rename them appropriately, ie qsSelToFirefox)
move both scripts to ~/Library/Scripts/
restart Quicksilver
set a qs trigger cmd-1 to qsSelToFirefox
set a qs trigger cmd-2 to qsSelToChrome

of course, I should point out, these new scripts only use QS for the
trigger. Probably more useful would be to use Automator and
applescript to make services of them. Then you could select a url,
right click on it, and open the url in a specific browser from your
contextual menu.

mbotta

unread,
Apr 5, 2010, 3:45:17 PM4/5/10
to Blacktree: Quicksilver
> However, you could easily alter qsGetSel to make qsGetURL2Firefox and
> qsGetURL2Chrome,  that is, make custom scripts that do exactly what
> you're talking about. And then set a separate trigger (cmd-1 and 2 in
> your examples) for each.

isn't there a way to have this open? i mean, to have quicksilver grab
the current selection and enable you to type the action you want to
perform on that selection? i don't want to hardcode that in
applescript.

thanks,

marco

Elastic Threads

unread,
Apr 5, 2010, 11:17:49 PM4/5/10
to Blacktree: Quicksilver
It only needs to be hardcoded if you want a single trigger to grab
selection and open a specific, non-default browser. And another
trigger to do the same but with a different browser. Which is the
case presented here.

You don't have to hard code it. I already did: http://is.gd/beTnR

Maybe i'm wrong. Someone please correct me.

But in my experience, applescripting QS is often the best, more
stable, solution.

Buck Banzai

unread,
Apr 7, 2010, 7:30:05 AM4/7/10
to Blacktree: Quicksilver
Hi there, been following this thread trying to fix my very own issue
I used triggers to get current selection and find with a number of
different web sites (usinf the web search module, i think) such as
youtube, wikipedia, imdb, torrentz, etc...
i found it quite handy as all i needed to do is select a pice of text
and then press a trigger depending in the site i wanted that selection
searched
get the idea'
but that does'nt work anymore because of the get current selection
issues.
You guys have presented at least two different solutions, what i
didn't figured out is if one can use that to perform what i tried to
explain

any thoughts?
thanks


Buck Banzai

unread,
Apr 7, 2010, 7:30:21 AM4/7/10
to Blacktree: Quicksilver

Elastic Threads

unread,
Apr 7, 2010, 5:20:00 PM4/7/10
to Blacktree: Quicksilver
I haven't used the web search module in a while, I've switched to an
applescript solution for that too:
read about it here: or download qSearch.applescript here:


But my sense is, because the websearch module searches text in QS's
third pane, and both Send Selection (built in and qsGetSel) to
Quicksilver solutions send the text to QS's first pane, that
integrating the two is difficult.

it's also hard to set up triggers to do two things (grab a selection
and then web search).

but its not hard to write/adapt an applescript to do what you want.

qsSelToSearch does just that : http://is.gd/bj3DF

download, unzip, and move it to ~/Library/Scripts/ folder
restart QS.
Go to triggers and click the plus sign.
start typing qsSelToSearch until it comes up, hit tab
set the second trigger pane to "run" the script
hit save and set up a keyboard shortcut.
Now select some text and hit your trigger.

The script is currently set up to search google with your selected
text.
But it is very easy to change it to any websearch. It uses Yubnub
(go to http://yubnub.org/ to learn more).
Yubnub lets easily search just about any website, you just send it a
prefix (for google its "g") and a search.
So "g puppies" via yubnub will google search "puppies".

If you open qsSelToSearch in AppleScript Editor you'll notice the
first line is
property mySearch : "g"

to change search engines, all you have to do is change the "g" to
whatever yubnub prefix works for your desired search.
to search IMDB change the "g" to "imdb"
to search yahoo change it to "y"
google images "gim"
wikipedia "wp"
and so on.

Since, I assume, you won't want to constantly open and change the one
variable depending on what search you want,
duplicate qsSelToSearch for each trigger you want to set up to send a
selection to a web search,
rename the scripts appropriately (qsSelToWikipedia, qsSeltoGoogle,
etc)
and in each script change that one variable.

Enoy.

Elastic Threads

unread,
Apr 7, 2010, 5:22:24 PM4/7/10
to Blacktree: Quicksilver
Oops. Forgot to link to the applescript alternative to the web search
module.
It sends text entered in QS first pane to yubnub.
I posted about it here:


http://groups.google.com/group/blacktree-quicksilver/browse_thread/thread/93dc805d6dae91bf/f8cbe87659de07d8?lnk=gst&q=qsearch#f8cbe87659de07d8

download it here:
http://is.gd/bj2C9

Rob McBroom

unread,
Apr 7, 2010, 8:55:34 PM4/7/10
to blacktree-...@googlegroups.com
On Apr 7, 2010, at 5:20 PM, Elastic Threads wrote:

> But my sense is, because the websearch module searches text in QS's
> third pane, and both Send Selection (built in and qsGetSel) to
> Quicksilver solutions send the text to QS's first pane, that
> integrating the two is difficult.

The main web search action is reversible. You can do

Google ⇥ Search For… ⇥ something

or

something ⇥ Find With… ⇥ Google

I do this all the time: ⌘⎋ ⇥ fw ⇥ g ↩

Not very many keystrokes at all and I don't have to find/remember an unused keyboard shortcut.

Elastic Threads

unread,
Apr 8, 2010, 12:24:04 AM4/8/10
to Blacktree: Quicksilver
Thanks. Always more to learn with QS. I never looked for "Find with",
seems like it'd make more sense if it was "Search with"

Anyway,
I still don't see how you could set up a trigger to do all that at
once.

qsSelToSearch uses QS to be triggered, but is instant. Select some
text, hit the trigger, and the search is run. The script should work
just as well with FastScripts or on its own.

Rob McBroom

unread,
Apr 8, 2010, 8:30:32 AM4/8/10
to blacktree-...@googlegroups.com
On Apr 8, 2010, at 12:24 AM, Elastic Threads wrote:

> Thanks. Always more to learn with QS. I never looked for "Find with",
> seems like it'd make more sense if it was "Search with"

Can't argue with that.

> I still don't see how you could set up a trigger to do all that at
> once.

I just created one as a test and it worked as expected. (I'm running ß54.) The trigger looked like this:

Current Selection ⇥ Find With… ⇥ Google

Note that for Google specifically, Safari already provides a "Search with Google" service. You just need to assign a hotkey to it in System Preferences. But for other searches, you'd probably want to use Quicksilver.

Elastic Threads

unread,
Apr 8, 2010, 10:27:53 AM4/8/10
to Blacktree: Quicksilver
Right. I'm on the newer builds (now b58) and Snow Leopard.

These builds rely on the Get Current Selection services, which work
alright. But don't work in applications which haven't made themselves
compatible with services (Chrome and Firefox don't).

Also you can't set up triggers with Services the way you describe.

The Current Selection proxy object you use in your example only works
with getting selected files from the Finder (in newer builds), which
I'd rarely google, and I can't set up the trigger you describe (I can
get current selection in the first pane, but not Find With in the
second).

So, if you want to get selection from a non-service compatible
application (Chrome, Firefox, and many more), and/or want to set up a
trigger with all of it, and use the newer builds, we're back to
applescripts.

Which work pretty well and are always system compatible.

Buck Banzai

unread,
Apr 8, 2010, 6:40:55 PM4/8/10
to Blacktree: Quicksilver
Thanks guys!

I eventually found out about the new b58 version and upgraded and it
works fine.
But your solution seems also fine, elastic.
But Rob understood quite well what i intended... as i use the two
different actions, both find with and search with, as follows:
- search with: made a trigger using a websearch site from web search
module, then search with and a blank third pane to write whatever i
need to search

find with: made a trigger using the current selection in the first
pane, find with in 2nd and the site i want to search for the selection

I find it very handy, and now it seems to work with b58 version.

And, if i may abuse your kindness, perhaps you could help me with
something else...
here's the thing...
there's a few pdf files that i would want to password protect. i know
i can password protect with the save as from file menu, but i guess
it's possible to simply select it in finder (one or more files) and
apply the password option thing just like that...
i tried to figure it out in automator but i just couldn't get it to
work, any ideas?

thanks again!
--
Subscription settings: http://groups.google.com/group/blacktree-quicksilver/subscribe?hl=en
Reply all
Reply to author
Forward
0 new messages