[LB6 Action] Spotlight (Integrated) [UPDATED]

Sharing and discussing custom actions for LaunchBar
Jono
Rank 3
Rank 3
Posts: 157
Joined: Mon Feb 25, 2008 11:25 am
Location: UK
Contact:

Re: [LB6 Action] Spotlight (Integrated)

Postby Jono » Fri Jul 04, 2014 10:46 am

iRounak wrote:Guess you have screwed up the original scripts/actions.

I mean the original action by nbjahan, and the (unmodified) scripts after that, not ones I've modified. Actually, the 'Spotlight Search by Name' does open result items for me if I hit return, but not the others.

But your script works fine. And I made some others based off that one and they also all work fine, thanks! :D

Jono
Rank 3
Rank 3
Posts: 157
Joined: Mon Feb 25, 2008 11:25 am
Location: UK
Contact:

Re: [LB6 Action] Spotlight (Integrated)

Postby Jono » Fri Jul 11, 2014 10:54 am

I'm still tweaking these searches (which I'm using all the time, so useful :D ).

How would I search for different specified document types, but as well as searching for the file name also search the tags, Spotlight comments, text content etc. At the moment they only search for the file names.

Here's what I have for a couple of them.

Code: Select all

      set thecmd to "mdfind -onlyin ~/ 'kMDItemDisplayName == " & quote & thequery & "*" & quote & "wc" & " && (kMDItemContentType == \"com.adobe.photoshop-image\"||kMDItemContentType == \"com.adobe.illustrator.ai-image\"||kMDItemContentType == \"com.bohemiancoding.sketch.drawing\")'"


Code: Select all

set thecmd to "mdfind -onlyin ~/ 'kMDItemDisplayName == " & quote & thequery & "*" & quote & "wc" & " && (kMDItemContentType == \"com.apple.iwork.pages.pages\"||kMDItemContentType == \"public.rtf\"||kMDItemContentType == \"com.microsoft.word.doc\"||kMDItemContentType == \"org.openxmlformats.wordprocessingml.document\")'"

Jono
Rank 3
Rank 3
Posts: 157
Joined: Mon Feb 25, 2008 11:25 am
Location: UK
Contact:

Re: [LB6 Action] Spotlight (Integrated)

Postby Jono » Thu Jul 17, 2014 5:03 pm

…nevermind, I've managed to figure this out.

nbjahan
Rank 1
Rank 1
Posts: 34
Joined: Sat Jun 28, 2014 1:06 pm

Re: [LB6 Action] Spotlight (Integrated) [UPDATED]

Postby nbjahan » Wed Jul 23, 2014 1:00 pm

New version available. Check the first post or
https://github.com/nbjahan/launchbar-spotlight

New Features

- Single action (Hold ^ to search by name)
- Send folders to change the search path
- Suggest search in parent folders if not found
- Check for updates , ...

Jono
Rank 3
Rank 3
Posts: 157
Joined: Mon Feb 25, 2008 11:25 am
Location: UK
Contact:

Re: [LB6 Action] Spotlight (Integrated) [UPDATED]

Postby Jono » Mon Jul 28, 2014 10:17 am

Nice, thanks.

I guess 'Pinboard: Preferences' should be renamed to just 'Preferences' :)

nbjahan
Rank 1
Rank 1
Posts: 34
Joined: Sat Jun 28, 2014 1:06 pm

Re: [LB6 Action] Spotlight (Integrated) [UPDATED]

Postby nbjahan » Mon Jul 28, 2014 5:16 pm

That's because LaunchBar recent list (⌘B) will display those items. With general names, they will make no sense.

Jono
Rank 3
Rank 3
Posts: 157
Joined: Mon Feb 25, 2008 11:25 am
Location: UK
Contact:

Re: [LB6 Action] Spotlight (Integrated) [UPDATED]

Postby Jono » Mon Jul 28, 2014 5:36 pm

In that case shouldn't it be 'Spotlight Preferences' instead go 'Pinboard Preferences'?

nbjahan
Rank 1
Rank 1
Posts: 34
Joined: Sat Jun 28, 2014 1:06 pm

Re: [LB6 Action] Spotlight (Integrated) [UPDATED]

Postby nbjahan » Mon Jul 28, 2014 8:15 pm

lol Jono you got me :)
will fix it thanks!

Jono
Rank 3
Rank 3
Posts: 157
Joined: Mon Feb 25, 2008 11:25 am
Location: UK
Contact:

Re: [LB6 Action] Spotlight (Integrated) [UPDATED]

Postby Jono » Tue Jul 29, 2014 1:28 am

Haha, excellent :lol:

nbjahan
Rank 1
Rank 1
Posts: 34
Joined: Sat Jun 28, 2014 1:06 pm

Re: [LB6 Action] Spotlight (Integrated) [UPDATED]

Postby nbjahan » Tue Jul 29, 2014 7:12 am

done. now let's see if Check for updates works as expected ...

Jono
Rank 3
Rank 3
Posts: 157
Joined: Mon Feb 25, 2008 11:25 am
Location: UK
Contact:

Re: [LB6 Action] Spotlight (Integrated) [UPDATED]

Postby Jono » Tue Jul 29, 2014 9:33 am

Yep, just checked for updates and it found the new version :)

nbjahan
Rank 1
Rank 1
Posts: 34
Joined: Sat Jun 28, 2014 1:06 pm

Re: [LB6 Action] Spotlight (Integrated) [UPDATED]

Postby nbjahan » Sun Nov 23, 2014 4:17 pm

New Version: 2.1.0

- Ability to change the search path by typing the folder path

launchbar-spotlight-v2.1.0.png
launchbar-spotlight-v2.1.0.png (40.53 KiB) Viewed 20463 times

lycopodiopsida
Posts: 14
Joined: Mon Nov 10, 2014 1:01 pm

Re: [LB6 Action] Spotlight (Integrated) [UPDATED]

Postby lycopodiopsida » Sun Nov 23, 2014 4:41 pm

Excellent work, thank you!

Jono
Rank 3
Rank 3
Posts: 157
Joined: Mon Feb 25, 2008 11:25 am
Location: UK
Contact:

Re: [LB6 Action] Spotlight (Integrated) [UPDATED]

Postby Jono » Wed Mar 09, 2016 12:31 pm

…a few years later…

Is there any way to set the sort order of the results shown? For example sort by modified date, with newest modified at the top.

iRounak
Rank 4
Rank 4
Posts: 191
Joined: Fri Oct 23, 2009 7:11 pm
Contact:

Re: [LB6 Action] Spotlight (Integrated) [UPDATED]

Postby iRounak » Fri Mar 11, 2016 6:28 pm

Jono wrote:…a few years later…

Is there any way to set the sort order of the results shown? For example sort by modified date, with newest modified at the top.

If it is not possible to do it with mdfind, the modified date could be got via applescript and the results can be sorted before they are sent to LaunchBar for display.


Return to “LaunchBar Actions”

Who is online

Users browsing this forum: No registered users and 4 guests