Page 1 of 2

Request for "Shelf"

Posted: Tue Dec 16, 2008 1:24 am
by factoryjoe
One of the features I miss most from QuickSilver is the Shelf module (described here).

Would it be possible to offer a similar kind of "permanent clipboard" in LaunchBar?

Re: Request for "Shelf"

Posted: Tue Dec 16, 2008 3:47 am
by Dennis
From your link, this idea sounds similar to LaunchBar's Text Clips feature except that you can add new snippets of text from within Quicksilver. With LaunchBar's Text Clips, you need to create them ahead of time.

Of course, I suppose you could write an AppleScript action to take an input string and save it as a LaunchBar Text Clip in a predetermined location that LaunchBar indexes. That's 90% of Quicksilver's Shelf feature right there! ;-)

Can Quicksilver's shelf also store images and other kinds of data?

-Dennis

Re: Request for "Shelf"

Posted: Tue Dec 16, 2008 3:49 am
by factoryjoe
Dennis wrote:From your link, this idea sounds similar to LaunchBar's Text Clips feature except that you can add new snippets of text from within Quicksilver. With LaunchBar's Text Clips, you need to create them ahead of time.

Can Quicksilver's shelf also store images and other kinds of data?


You can drag ANYTHING to the shelf -- including Applications, images, text, HTML, audio, video... the Shelf basically stores references to the original objects unless it's text.

Re: Request for "Shelf"

Posted: Tue Dec 16, 2008 4:00 am
by Dennis
factoryjoe wrote:...the Shelf basically stores references to the original objects unless it's text.


Hmm, sounds like that could be handled with AppleScript too. Just create two handlers:

  1. Use this handler to deal with text passed to the action by creating a new Text Clip from the input in a predetermined location that's indexed by LaunchBar.

    Code: Select all

    on handle_string(theString)

  2. Use this handler to deal with files passed to the action by creating an alias to each of the passed files in a predetermined location that's indexed by LaunchBar.

    Code: Select all

    on open thefFiles


I wouldn't be surprised if Quicksilver was doing something similar under the hood. I don't mean to suggest you shouldn't send this in as a feature request. I'm just pointing out that you can implement at least part of this functionality on your own with a bit of AppleScript.

-Dennis

Posted: Tue Dec 16, 2008 4:08 am
by factoryjoe
Unfortunately I'm not really much of a developer, so saying that something can be done with AppleScript only leaves me tantalized! ;)

I did find references in the QuickSilver source code to the Shelf module however... maybe this will help?

http://www.google.com/codesearch?hl=en& ... ibrarian.h

Posted: Tue Dec 16, 2008 4:16 am
by Dennis
If I have time maybe I'll throw something together. It sounds like it'd be fun to try out. I'll be sure to post back here if I do.

But you should still send a feature request to Objective Development. I'm sure they could come up with something a lot better than my AppleScript. :-)

Unfortunately, I think it's probably too late for any new features in the 5.0 release. But maybe they'd consider it for the future.

-Dennis

Posted: Tue Dec 16, 2008 12:04 pm
by ludwigschubert
If you're still interested in a script for new text clippings, here's what I've been using:


Code: Select all

on handle_string(input)
   if input is not "" then
      
      set clipFolder to POSIX file "/Path/To/Your/TextClips/" as string
      
      set clipName to text returned of (display dialog "Enter name for new Text Clip containing" & return & ¬
         quoted form of input ¬
         with title ¬
         "New Text Clip" default answer ¬
         "" buttons {"Cancel", "Create"} ¬
         default button 2)
      
      set clipFile to clipFolder & clipName & ".clip.txt"
      
      try
         set open_file to ¬
            open for access file clipFile with write permission
         -- erase current contents of file:
         set eof of open_file to 0
         write input as text to open_file starting at eof
         close access open_file
      on error
         try
            close access file clipFile
            display dialog "Error"
         end try
      end try
      open location "x-launchbar:hide"
   end if
end handle_string

Qu-s

Posted: Wed Dec 24, 2008 11:15 pm
by factoryjoe
I thought I'd point out a new app called Qu-s, which implements a shelf-like interface with some very clever URL-based smarts that would make a lot of sense in LaunchBar:

http://www.qu-s.eu/flash/index.html

Posted: Tue Dec 30, 2008 1:11 am
by bmastenbrook
If you'd like a true shelf, try Together. I've been playing it with it for a few days and it does seem interesting. I'm not quite sure how I'm going to work with it and Launchbar yet.

Posted: Tue Dec 30, 2008 1:12 am
by bmastenbrook

Posted: Thu Jan 15, 2009 7:28 pm
by ptujec
ludwigschubert wrote:If you're still interested in a script for new text clippings, here's what I've been using:


Code: Select all

on handle_string(input)
   if input is not "" then
      
      set clipFolder to POSIX file "/Path/To/Your/TextClips/" as string
      
      set clipName to text returned of (display dialog "Enter name for new Text Clip containing" & return & ¬
         quoted form of input ¬
         with title ¬
         "New Text Clip" default answer ¬
         "" buttons {"Cancel", "Create"} ¬
         default button 2)
      
      set clipFile to clipFolder & clipName & ".clip.txt"
      
      try
         set open_file to ¬
            open for access file clipFile with write permission
         -- erase current contents of file:
         set eof of open_file to 0
         write input as text to open_file starting at eof
         close access open_file
      on error
         try
            close access file clipFile
            display dialog "Error"
         end try
      end try
      open location "x-launchbar:hide"
   end if
end handle_string


Nice Idea. But it doesnt work for me. Was trying to put a pdf there ... Fail
Ok, it works for text though

Posted: Fri Jan 16, 2009 1:30 am
by ludwigschubert
Yeah, I'd hoped I made that clear… it's for text only.
I use it to make TextClips a little more flexible. Not really a shelf.

Note that it doesn't work correctly when LaunchBar is in nonactivating mode though: the script's dialogue will appear behind the frontmost window where you can't see it. :(

Posted: Fri Jan 16, 2009 1:44 am
by norbert
ludwigschubert wrote:Note that it doesn't work correctly when LaunchBar is in nonactivating mode though: the script's dialogue will appear behind the frontmost window where you can't see it. :(


Before opening the dialog, insert

Code: Select all

tell application "LaunchBar" to activate

to make it work in nonactivating mode as well.

Posted: Fri Jan 16, 2009 3:07 pm
by ptujec
ludwigschubert wrote:Yeah, I'd hoped I made that clear… it's for text only.
I use it to make TextClips a little more flexible. Not really a shelf.


Is there no way to add something like this to it?

Code: Select all

tell application "Finder"
   make new alias file at desktop to POSIX file ...


I just know to little about applescript to make it work

It would be cool though because if you add ".clip.txt" to the alias it will work like a clipping

Re: Request for "Shelf"

Posted: Fri Jun 05, 2009 1:45 am
by claytron
There are a lot of applications that can do clipboard and possibly shelf functionalities. But I'd really like to use just one app for this. The clipboard functionality is really nice in LaunchBar. I'd love to see a implementation of a permanent clipboard in LaunchBar.

This is one feature that may keep me from switching from Quicksilver since I use it a lot. Nudge nudge, wink wink :)