Using a Ruby Script borrowed from Dropzone.app?

33 views
Skip to first unread message

paulw

unread,
Apr 10, 2013, 10:41:08 AM4/10/13
to blacktree-...@googlegroups.com
If anyone is familiar with Dropzone, there's an action it includes that installs apps—it unzips and opens dmg's, installs the app, ejects the dmg and trashes the dmg and/or zip. Very convenient.

I'd love to be able to use that Dropzone script (it's a ruby script) as a Quicksilver action. If you have Dropzone, it's located at /Applications/Dropzone.app/Contents/Resources/Destination Scripts/lib/installapp.rb

I tried installing it in ~/Library/Application Support/Quicksilver/Actions but it didn't work. N.B. I know nothing about Ruby.

Any ideas?

Jon Stovell

unread,
Apr 10, 2013, 10:48:55 AM4/10/13
to blacktree-...@googlegroups.com
You could pretty easily create an action using AppleScript that simply passes files from QS's first pane to that ruby script for processing. See http://qsapp.com/wiki/AppleScripts#Write_your_own

Rob McBroom

unread,
Apr 11, 2013, 8:53:56 AM4/11/13
to blacktree-...@googlegroups.com
On Apr 10, 2013, at 10:41 AM, paulw <paulr...@gmail.com> wrote:

> If anyone is familiar with Dropzone, there's an action it includes that installs apps—it unzips and opens dmg's, installs the app, ejects the dmg and trashes the dmg and/or zip. Very convenient.
>
> I'd love to be able to use that Dropzone script (it's a ruby script) as a Quicksilver action. If you have Dropzone, it's located at /Applications/Dropzone.app/Contents/Resources/Destination Scripts/lib/installapp.rb

How would you use it normally? If you just drop a DMG on Dropzone.app, then you should be able to do the same thing by selecting the file and using the “Open With…” action.

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

paulw

unread,
Apr 12, 2013, 10:16:19 AM4/12/13
to blacktree-...@googlegroups.com
Jon, thanks, I'll look into that option. I'm only a little bit familiar with Applescript.

paulw

unread,
Apr 12, 2013, 10:19:58 AM4/12/13
to blacktree-...@googlegroups.com, mailin...@skurfer.com
Rob, you hold files over Dropzone and then a menu of multiple actions pops up. Then you drop the file on one of those actions. Doing "open with" to Dropzone doesn't open that menu or pass the file on to Dropzone's actions. I'll see if I can get an Applescript to send a file to that ruby script. If I can figure that out.

paulw

unread,
Apr 12, 2013, 1:02:19 PM4/12/13
to blacktree-...@googlegroups.com, mailin...@skurfer.com
Can someone advise me on how to pass the posix path of QS's first pane to a rubyscript, without going through applescript first? i.e., run a rubyscript in the second pane and have it be able to access the first pane's file path.

Jon Stovell

unread,
Apr 12, 2013, 3:17:16 PM4/12/13
to blacktree-...@googlegroups.com
Try this. It assumes that you can simply run the ruby script on the command line by specifying a file path to operate on. If that isn't true, this won't work. Of course, it might not work anyway, since I don't have Dropzone or know anything about how it functions. :)

using terms from application "Quicksilver"

on open files thefiles

set thefiles to thefiles as list --just in case it isn't already a list.

repeat with i from 1 to count thefiles

do shell script "/Applications/Dropzone.app/Contents/Resources/Destination Scripts/lib/installapp.rb " & posix path of item i of thefiles

end repeat

end open files

end using terms from

Paul Wirth

unread,
Apr 12, 2013, 4:44:45 PM4/12/13
to blacktree-...@googlegroups.com
Thanks Jon. That doesn't work. The rubyscript uses this at the beginning:
$SELECT_APP_PATH = "SelectAppDialog.app/Contents/MacOS/SelectAppDialog"

It looks like $SELECT_APP_PATH is the path of the file as sent by another aspect of the Dropzone app. I was thinking of just copying the rubyscript to Quicksilver's Actions folder and editing it so that $SELECT_APP_PATH reflects whatever is in the first pane of QS. It seems like it ought to be simple: get applescript to send the path to the RS some way or another?

Paul

--
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/Bnvt-LOnsKY/unsubscribe?hl=en.
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jon Stovell

unread,
Apr 12, 2013, 8:34:45 PM4/12/13
to blacktree-...@googlegroups.com
I expect so. It sounds like you are in the classic script hacker's position: it's time to learn some ruby so you can make it do what you want. ;)
To unsubscribe from this group and all its topics, send an email to blacktree-quicksilver+unsub...@googlegroups.com.

Paul Wirth

unread,
Apr 12, 2013, 11:16:21 PM4/12/13
to blacktree-...@googlegroups.com
heh. i'll see what i can figure out…

To unsubscribe from this group and all its topics, send an email to blacktree-quicks...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages