How to make QS to work with a single Finder window?

105 views
Skip to first unread message

Leo

unread,
Jul 28, 2014, 1:11:49 PM7/28/14
to blacktree-...@googlegroups.com
All,

That's a simple question but i couldn't find the answer in QS archives. I'm tired of so many Finder windows and  I wanna work with a single one. Namely, i wanna something like "Open directory in the current Finder" window?

Thanks in advance

Rob McBroom

unread,
Jul 28, 2014, 5:55:13 PM7/28/14
to blacktree-...@googlegroups.com

Quicksilver just asks the OS to open the folder. The specific behavior is determined by Finder. Some possibilities:

  1. Try Path Finder. It tends to be more customizable (but I don’t know if it does what you want).
  2. See if you can do what you want with AppleScript. If so, you could create a custom action to use on folders instead of “Open”. (See the QS manual for details.)

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

Leo

unread,
Jul 30, 2014, 10:07:14 AM7/30/14
to blacktree-...@googlegroups.com, mailin...@skurfer.com
Hello Bob,

Thanks for your answer. I knew (and still don't know) much about AppleScripting. I came up with that. It is not working accordingly, though. Any clue? Thanks

using terms from application "Quicksilver"

-- on get direct types

-- return {"NSStringPboardType"}

-- end get direct types

on open files _items_

try

tell application "Finder"

repeat while window 2 exists

close window 2

end repeat

end tell

-- on error a number b

-- activate

--display dialog a with title "error with your QS action script"

end try

end open files

end using terms from

Rob McBroom

unread,
Jul 30, 2014, 11:16:21 AM7/30/14
to blacktree-...@googlegroups.com
On 30 Jul 2014, at 10:07, Leo wrote:

> Thanks for your answer. I knew (and still don't know) much about
> AppleScripting. I came up with that. It is not working accordingly,
> though.
> Any clue? Thanks

I don’t do much with AppleScript either, but Google led me to this

http://superuser.com/questions/655629/how-can-i-open-a-folder-in-the-current-finder-window

Seems like more or less what you want.

Leo

unread,
Aug 6, 2014, 9:08:10 AM8/6/14
to blacktree-...@googlegroups.com, mailin...@skurfer.com

Thanks. I finally had chance to do some AppleScript. Here you go below. In fact, it leaves two Finder windows open. 

Now, I was wondering. Is there any way of set my script to be the default action whenever I have folders in my 1st pane? Alternatively, is there a way of replace the "Open" action "source code? I have search that in QS folder in vain.

Thanks again 

using terms from application "Quicksilver"

on open files theFiles

-- try

set filePath to item 1 of theFiles

tell application "Finder"

activate

repeat while window 2 exists

close window 2

end repeat

open filePath

tell the front Finder window

set toolbar visible to false

set statusbar visible to false

set the sidebar width to 0

set the current view to column view

set the bounds to {36, 116, 511, 674}

end tell

end tell

-- on error a number b

-- activate

-- display dialog a with title "error with your QS action script"

-- end try

end open files

on get direct types

return {"NSFilenamesPboardType"}

end get direct types

end using terms from

Rob McBroom

unread,
Aug 19, 2014, 11:32:52 PM8/19/14
to blacktree-...@googlegroups.com

On 6 Aug 2014, at 9:08, Leo wrote:

Now, I was wondering. Is there any way of set my script to be the default
action whenever I have folders in my 1st pane?

If it’s in ~/Library/Application Support/Quicksilver/Actions, you go to Preferences → Actions and drag it up higher on the list. I’m not sure if it will correctly appear only for files, though, so it might show up at the wrong time.

Alternatively, is there a way of replace the "Open" action "source code? I have search that in QS folder in vain.

Adding a new action would probably make more sense, but of course that’s always an option.

http://projects.skurfer.com/QuicksilverPlug-inReference.mdown

Jon Stovell

unread,
Aug 20, 2014, 1:51:13 PM8/20/14
to blacktree-...@googlegroups.com, mailin...@skurfer.com
It sounds like what you want is a way to change which folder the front Finder window is showing you, instead of having a new Finder window open up to show you that folder. The following script will do that consistently. However, if you use the comma trick to select more than one item in Quicksilver's first pane and then run this action, you will end up with a Finder window (or tab, if you set Finder to use tabs in its preferences) for each item. This action also works as a Reveal action if you select a file instead of a folder.

Since it looks like you also want to force the Finder GUI into a specific configuration while you are at it, you'll need to add those bits in for yourself.

on open input

repeat with i from 1 to (count input)

set thisitem to item i of input

tell application "Finder"

activate

if (count input) is 1 then

if thisitem's kind is "Folder" then

try

set folder of front window to thisitem

on error

open thisitem

end try

else

try

set folder of front window to thisitem's container

reveal thisitem

on error

reveal thisitem

end try

end if

else if thisitem's kind is "Folder" then

open thisitem

else

reveal thisitem

end if

end tell

end repeat

end open

Beery Holstein

unread,
Nov 26, 2014, 3:09:18 PM11/26/14
to blacktree-...@googlegroups.com, mailin...@skurfer.com
That's useful. 
How can I see it to open a new tab in the current Finder?

Rob McBroom

unread,
Nov 27, 2014, 12:15:55 AM11/27/14
to blacktree-...@googlegroups.com
On 26 Nov 2014, at 15:09, Beery Holstein wrote:

> That's useful.
> How can I see it to open a new tab in the current Finder?

Scripting Bridge or AppleScript (if it’s possible at all).

philostein

unread,
Nov 28, 2014, 6:49:02 PM11/28/14
to
Not sure if you're still looking for something, but here's a post I wrote a while back:

<a href="http://blog.qsapp.com/post/66560143350/opening-folders-in-finder-tabs">pening Folders in Finder Tabs</a>

Bit of a kludge, but still works, with retro Finder icon too. :)

Script:

<code>

on open _file

try

tell application "Finder" to activate

delay 0.25

if (count of _file) > 1 then error "Only one file or folder for now, I'm afraid…" number 1

tell application "System Events"

tell process "Finder" to click menu item "New Tab" of menu "File" of menu bar 1

end tell

tell application "Finder"

if class of _file is folder then

set target of window 1 to _file

else

set _container to container of item 1 of _file as text

if _container = ":" then set _container to "Volumes:"

set target of window 1 to alias _container

delay 0.3

set selection to _file

delay 0.1

end if

end tell

on error a number b

tell application "Finder" to display dialog a

end try

end open

</code>



On Tuesday, 29 July 2014 02:11:49 UTC+9, Leo wrote:
All,

That's a simple question but i couldn't find the answer in QS archives. I'm tired of so many Finder windows and  I wanna work with a single one. Namely, i wanna something like "Open directory in the current Finder" window?

Thanks in advanc

Beery Holstein

unread,
Nov 29, 2014, 9:51:15 AM11/29/14
to blacktree-...@googlegroups.com
It does - thanks. But unlike the default open which get into the folder (when folder is selected in the first pane), the action will open the enclosed folder (and have the folder from pane 1 selected).

1.61803

unread,
Jan 11, 2015, 8:48:36 PM1/11/15
to blacktree-...@googlegroups.com
On Monday, July 28, 2014 at 7:11:49 PM UTC+2, Leo wrote:
That's a simple question but i couldn't find the answer in QS archives. I'm tired of so many Finder windows and  I wanna work with a single one. Namely, i wanna something like "Open directory in the current Finder" window?

Check this applescript action -> http://blog.qsapp.com/post/24289046304/go-to-here

philostein

unread,
Jan 13, 2015, 6:06:57 AM1/13/15
to blacktree-...@googlegroups.com
Hmmm, it seems if class of item 1 of _file is folder is returning false for folders.

Try:

if kind of item 1 of _file is "folder" then


for that line.

Leonardo Barbosa

unread,
Jan 13, 2015, 7:57:46 AM1/13/15
to blacktree-...@googlegroups.com

Hello all,

Thanks for all replies. The good thing about the open action though is its wildcard nature, namely, it is able to recognize the target (whether it's an application, file, or folder) and take an action, accordingly. I'd like something like the open default action, the only difference would happen while opening a folder, that would open it in the current finder window. Is it possible to combine all those hints to come up with an action like this?

  L 



--
You received this message because you are subscribed to a topic in the Google Groups "Quicksilver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/blacktree-quicksilver/9Doso8XrQhE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to blacktree-quicks...@googlegroups.com.
To post to this group, send email to blacktree-...@googlegroups.com.
Visit this group at http://groups.google.com/group/blacktree-quicksilver.
For more options, visit https://groups.google.com/d/optout.

Rob McBroom

unread,
Jan 13, 2015, 1:29:08 PM1/13/15
to blacktree-...@googlegroups.com

On 13 Jan 2015, at 7:57, Leonardo Barbosa wrote:

Thanks for all replies. The good thing about the open action though is its
wildcard nature, namely, it is able to recognize the target (whether it's
an application, file, or folder) and take an action, accordingly.

Eh, not really. It’s the same thing that would happen if you double-clicked the selected item in Finder, or typed open /path/to/file in Terminal. Quicksilver isn’t doing much thinking about what to do.

You could make a modified version of the Open action that checks to see if the thing is a Folder and does something different. No need to modify the app. Just make a one-action plug-in.

Reply all
Reply to author
Forward
0 new messages