Request for "Shelf"

General discussions about LaunchBar
factoryjoe
Posts: 9
Joined: Tue Dec 16, 2008 12:18 am
Contact:

Request for "Shelf"

Post by factoryjoe » Tue Dec 16, 2008 1:24 am

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?

Dennis
Rank 3
Rank 3
Posts: 146
Joined: Mon Dec 10, 2007 7:47 pm
Location: California

Re: Request for "Shelf"

Post by Dennis » Tue Dec 16, 2008 3:47 am

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

factoryjoe
Posts: 9
Joined: Tue Dec 16, 2008 12:18 am
Contact:

Re: Request for "Shelf"

Post by factoryjoe » Tue Dec 16, 2008 3:49 am

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.

Dennis
Rank 3
Rank 3
Posts: 146
Joined: Mon Dec 10, 2007 7:47 pm
Location: California

Re: Request for "Shelf"

Post by Dennis » Tue Dec 16, 2008 4:00 am

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

factoryjoe
Posts: 9
Joined: Tue Dec 16, 2008 12:18 am
Contact:

Post by factoryjoe » Tue Dec 16, 2008 4:08 am

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

Dennis
Rank 3
Rank 3
Posts: 146
Joined: Mon Dec 10, 2007 7:47 pm
Location: California

Post by Dennis » Tue Dec 16, 2008 4:16 am

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

ludwigschubert
Rank 4
Rank 4
Posts: 285
Joined: Fri Jun 29, 2007 5:54 pm
Location: Germany, Bavaria

Post by ludwigschubert » Tue Dec 16, 2008 12:04 pm

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

factoryjoe
Posts: 9
Joined: Tue Dec 16, 2008 12:18 am
Contact:

Qu-s

Post by factoryjoe » Wed Dec 24, 2008 11:15 pm

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

bmastenbrook
Posts: 2
Joined: Tue Dec 30, 2008 1:10 am

Post by bmastenbrook » Tue Dec 30, 2008 1:11 am

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.

bmastenbrook
Posts: 2
Joined: Tue Dec 30, 2008 1:10 am

Post by bmastenbrook » Tue Dec 30, 2008 1:12 am


ptujec
Wizard
Wizard
Posts: 321
Joined: Fri Dec 19, 2008 11:36 am
Contact:

Post by ptujec » Thu Jan 15, 2009 7:28 pm

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

ludwigschubert
Rank 4
Rank 4
Posts: 285
Joined: Fri Jun 29, 2007 5:54 pm
Location: Germany, Bavaria

Post by ludwigschubert » Fri Jan 16, 2009 1:30 am

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. :(

norbert
Objective Development
Objective Development
Posts: 648
Joined: Thu Nov 09, 2006 6:30 pm

Post by norbert » Fri Jan 16, 2009 1:44 am

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.

ptujec
Wizard
Wizard
Posts: 321
Joined: Fri Dec 19, 2008 11:36 am
Contact:

Post by ptujec » Fri Jan 16, 2009 3:07 pm

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

claytron
Posts: 2
Joined: Fri Jun 05, 2009 1:38 am

Re: Request for "Shelf"

Post by claytron » Fri Jun 05, 2009 1:45 am

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 :)

Post Reply