Quicksilver just asks the OS to open the folder. The specific behavior is determined by Finder. Some possibilities:
--
Rob McBroom
http://www.skurfer.com/
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
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 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
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 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
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
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?
if kind of item 1 of _file is "folder" then
for that line.
--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.
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.