Clicky

houdah
Tips & Tricks: Automate HoudahSpot
 
HoudahSpot integrates nicely with your automated work flows. Use the custom URL scheme to start HoudahSpot searches from third party tools like LaunchBar and Alfred. Use AppleScript to access search results and build more advanced workflows.
 
The custom URL scheme supports 3 commands:
 
1. blitzSearch - start a search
 
Example: hhspot://blitzSearch?searchString=*&filenameFlag=YES&contentFlag=YES&commentsFlag=YES
 
Arguments:
- searchString: text to search for
- anyTextFlag: set to YES to add an "Any text" criterion to your search
- filenameFlag: set to YES to add a "Name" criterion to your search
- contentFlag: set to YES to add a "Text Content" criterion to your search
- commentsFlag: set to YES to add a "Spotlight Comment" criterion to your search
- finderScopeFlag: set to YES to search the location of the current Finder window
- templateName: name of the template to base the search on. BlitzSearch criteria are added to existing criteria
- tag: name of the tag to search for. Multiple occurrences allowed
- matchAnyTagFlag: set to YES to find files matching any (rather than all) specified tags
- scopeLocation: folder location to search. Multiple occurrences allowed
 
 
2. keywordTagSearch - search for files by Open Meta tags, Finder tags or keywords
 
Example: hhspot://keywordTagSearch?tags=One,Two&matchAny=YES
 
- tags: comma-separated list of tags to search for. You may need URL-encode the comma as %2C
- matchAny: set to YES to find files matching any (rather than all) specified tags
 
 
3. tagSearch - search for files by Open Meta tags
 
Example: hhspot://tagSearch?tags=One,Two&matchAny=YES
 
- tags: comma-separated list of tags to search for. You may need URL-encode the comma as %2C
- matchAny: set to YES to find files matching any (rather than all) specified tags
 
 
HoudahSpot implements the following AppleScript commands:
 
1. blitzSearch - start a search
2. folderSearch - create a search scoped to the specified folder location
3. openTemplate - create a search from a template
4. folderSearch - create a search scoped to the location of the current Finder window
5. tagSearch - search for files by Open Meta tags
6. keywordTagSearch - search for files by Open Meta tags, Finder tags or keywords
 
 
You may also access the names and file paths of search results using AppleScript:
 
tell application "HoudahSpot"
set allPaths to path of every result of first document
end tell
 
Please refer to the AppleScript dictionary for details on the arguments to the above commands.
 
Houdah Software s. à r. l.
https://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Advanced file search utility
Tembo: Easy and effective file search
0 0
Jono
Very useful, thanks!
0 0
Jono
Is there an way to initiate a search from LaunchBar 6 or Alfred 2 that would search a HoudahSpot template, then return the results back in LaunchBar 6 or Alfred 2? 

It would be really useful if this was possible, ideally being able to run it in the background so that HoudahSpot is running but not showing HoudahSpot's search window.
0 0
houdah
Hi!

You can start the search. You can access the results. But you cannot predict when the search has completed.
You could send HoudahSpot to the background or minimize the window. The window will show at least briefly. It is needed to access the search results.

I don't think you will be able to achieve what you are trying to do with the current AppleScript capabilities of HoudahSpot.

Best,
Pierre Bernard
Houdah Software s.à r.l.


Houdah Software s. à r. l.
https://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Advanced file search utility
Tembo: Easy and effective file search
0 0
Jono
OK, thanks for the information. Maybe in a future version :)
0 0
houdah
The original post has been updated and republished to the Houdah Tips & Tricks blog:
http://blog.houdah.com/2014/03/automate-houdahspot/
Houdah Software s. à r. l.
https://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Advanced file search utility
Tembo: Easy and effective file search
0 0