Page 2 of 3

Re: [LB6 Action] Spotlight (Integrated)

Posted: Fri Jul 04, 2014 10:46 am
by Jono
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

Re: [LB6 Action] Spotlight (Integrated)

Posted: Fri Jul 11, 2014 10:54 am
by Jono
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\")'"

Re: [LB6 Action] Spotlight (Integrated)

Posted: Thu Jul 17, 2014 5:03 pm
by Jono
…nevermind, I've managed to figure this out.

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

Posted: Wed Jul 23, 2014 1:00 pm
by nbjahan
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 , ...

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

Posted: Mon Jul 28, 2014 10:17 am
by Jono
Nice, thanks.

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

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

Posted: Mon Jul 28, 2014 5:16 pm
by nbjahan
That's because LaunchBar recent list (⌘B) will display those items. With general names, they will make no sense.

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

Posted: Mon Jul 28, 2014 5:36 pm
by Jono
In that case shouldn't it be 'Spotlight Preferences' instead go 'Pinboard Preferences'?

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

Posted: Mon Jul 28, 2014 8:15 pm
by nbjahan
lol Jono you got me :)
will fix it thanks!

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

Posted: Tue Jul 29, 2014 1:28 am
by Jono
Haha, excellent :lol:

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

Posted: Tue Jul 29, 2014 7:12 am
by nbjahan
done. now let's see if Check for updates works as expected ...

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

Posted: Tue Jul 29, 2014 9:33 am
by Jono
Yep, just checked for updates and it found the new version :)

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

Posted: Sun Nov 23, 2014 4:17 pm
by nbjahan
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 23624 times

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

Posted: Sun Nov 23, 2014 4:41 pm
by lycopodiopsida
Excellent work, thank you!

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

Posted: Wed Mar 09, 2016 12:31 pm
by Jono
…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.

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

Posted: Fri Mar 11, 2016 6:28 pm
by iRounak
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.