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*
On Wednesday, August 6, 2014 7:08:10 AM UTC-6, Leo wrote:
>
>
> 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*
>
> On Wednesday, July 30, 2014 12:16:21 PM UTC-3, Rob McBroom wrote:
>>
>> 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.
>>
>> --
>> Rob McBroom
>> http://www.skurfer.com/
>>
>
--
You received this message because you are subscribed to the Google Groups
"Quicksilver" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/blacktree-quicksilver.
For more options, visit https://groups.google.com/d/optout.