Spotlight Tags via LB?

General discussions about LaunchBar
Post Reply
adman635
Posts: 14
Joined: Thu Mar 13, 2008 4:44 am

Spotlight Tags via LB?

Post by adman635 » Thu Apr 24, 2008 6:33 am

I recently saw this post on Lifehacker:
http://lifehacker.com/software/tags/met ... 169971.php

And was wondering if the same could be had in LB utilizing Applescripts and Instant Send? You could essentially grab a file by holding cmd+space then tab over to an apple script, then space into the text entry box and enter tags.

Yes? No?

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

Post by Dennis » Thu Apr 24, 2008 9:17 am

Absolutely, you could do that. Just write tags as Spotlight Comments. I wrote an AppleScript to do exactly that a while back, but I can't seem to find it now. Must have gotten lost somewhere along the way. If I come across it again, I'll be sure to post it here.

Looks like FredB wrote a script to do this a couple years ago. You can still find it here:

http://forums.obdev.at/viewtopic.php?t=137&highlight=spotlight+comment


UPDATE:

Here are a few links to some more scripts to accomplish Spotlight tagging with LaunchBar.
Last edited by Dennis on Fri May 09, 2008 5:50 pm, edited 1 time in total.

bdestill
Posts: 8
Joined: Fri Apr 25, 2008 3:43 am
Location: Evanston, IL USA
Contact:

Post by bdestill » Fri Apr 25, 2008 4:05 am

You can also make an automator workflow, save it as an application, and then use launchbar to open the app. It is pretty easy and works great.

Instructions from macworld are here: http://www.macworld.com/article/53491/2 ... mment.html

Instead of saving it as a plugin, save is as an app.

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

Post by Dennis » Fri Apr 25, 2008 8:09 pm

That's a good suggestion. Thanks for the link to the Macworld article.

-Dennis

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

Post by Dennis » Tue Apr 29, 2008 7:50 pm

Dennis wrote:I wrote an AppleScript to do exactly that a while back, but I can't seem to find it now. Must have gotten lost somewhere along the way. If I come across it again, I'll be sure to post it here.


I found my old "Add Spotlight Tag" script and posted it with some of my other scripts at:

http://homepage.mac.com/dennisrande/FileSharing41.html

Feel free to download it (and others) and use/modify however you wish.

-Dennis

Jono
Rank 4
Rank 4
Posts: 161
Joined: Mon Feb 25, 2008 11:25 am
Location: UK
Contact:

Post by Jono » Fri May 02, 2008 10:44 am

Excellent Dennis, that very handy for me! :)
And it great that it automatically adds the '&' prefix.

Any chance of updating it to add a growl message once it's tagged a file like FredB's?
(I tried adding the growl code myself but cant work out exactly which part to paste into your script as I don't know AppleScript :roll:).

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

Post by Dennis » Fri May 02, 2008 8:45 pm

Hi Jono. I don't have time to add Growl support today, but I'll put it on my list of things to do and post back here when it's done.

-Dennis

PS - Glad you like the script. :)

Jono
Rank 4
Rank 4
Posts: 161
Joined: Mon Feb 25, 2008 11:25 am
Location: UK
Contact:

Post by Jono » Sat May 03, 2008 11:16 am

Thanks a lot Dennis!

Jon
Posts: 2
Joined: Wed May 07, 2008 12:42 pm

Post by Jon » Wed May 07, 2008 2:03 pm

Hope you don't mind Dennis but I've jumped in and added Growl support. If you want the file its here:

Spotlight applescript with growl

This displays a notification for every item you tag showing the tag you added and the file. The script appears in the Growl preference pane in the applications list as 'LB add Spotlight Comment' where you can configure the notification.

[EDIT] Have updated the script to include two notifications (and fix an error). One notifies that the tags are added, the other that notifies you if the tags already existed in the file's spotlight comments.

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

Post by Dennis » Thu May 08, 2008 8:14 pm

Jon wrote:Hope you don't mind Dennis but I've jumped in and added Growl support.


Thanks, Jon! I don't mind at all. In fact, I'm glad to see others are interested in cooperating to make LaunchBar even more useful.

What we really need now is some kind of a community repository for all these AppleScripts so it'll be easier for people to find new stuff and add on functionality to LaunchBar. A long time ago (before these forums existed and LaunchBar discussion was handled on a mailing list), there was some talk of forming a community site, maybe even sponsored by Objective Development. But I guess that idea fell through, or maybe it just turned into these forums.

-Dennis

Jono
Rank 4
Rank 4
Posts: 161
Joined: Mon Feb 25, 2008 11:25 am
Location: UK
Contact:

Post by Jono » Fri May 09, 2008 10:47 am

Great, thanks a lot Jon!
I don't have the chance to try this out at the moment, but I'll give it a go soon :)

Jon
Posts: 2
Joined: Wed May 07, 2008 12:42 pm

Post by Jon » Fri May 09, 2008 11:14 am

Dennis wrote:What we really need now is some kind of a community repository for all these AppleScripts so it'll be easier for people to find new stuff and add on functionality to LaunchBar. A long time ago (before these forums existed and LaunchBar discussion was handled on a mailing list), there was some talk of forming a community site, maybe even sponsored by Objective Development. But I guess that idea fell through, or maybe it just turned into these forums.

-Dennis


I could set this up (when I have some time) I still ned to do my own site, too busy doing other people's at the moment ... and wasting time with AppleScript :roll:

Maybe for now you could update your first post above with links to relevant scripts as we find them. I'm in the process of switching over from Quicksilver at the moment so will be on the lookout for scripts to replace features in QS that I haven't come across in LB yet.


Jono wrote:I don't have the chance to try this out at the moment, but I'll give it a go soon


Let me know if it works for you.

By the way I've added a couple more scripts. One changes the prefix of the tag (just started using leap and halfway through tagging changed my prefixes without realising Leap didn't update them. Also added one to remove all spotlight comments from files.

Given them icons and named them so that they all appear together in the Growl pref pane too.

Cheers, Jon

Mon1018
Posts: 6
Joined: Fri Mar 14, 2008 12:01 pm
Location: Bergenfield,New Jersey
Contact:

Post by Mon1018 » Fri May 16, 2008 5:38 pm

So great...thank you for the quick help.

Jono
Rank 4
Rank 4
Posts: 161
Joined: Mon Feb 25, 2008 11:25 am
Location: UK
Contact:

Post by Jono » Tue Jun 03, 2008 10:00 am

Jon wrote:Let me know if it works for you.

Sorry, I forgot to say that this works great, thanks :)

Post Reply