Houdah Software Forum Archive

AppleScript question

Member #689
I'm trying to write an AppleScript that will do a blitz search with a specified template. After parsing a string, it results in:

tell application "HoudahSpot"

        blitzSearch "Hou" template "Emails"

end tell


This FAILS to find the template "Emails" even though it clearly exists, and can be opened directly within HoudahSpot. 

What could be going wrong here?

Houdah Software
Hi!

The template parameter takes a file path.

Here is a script that performs what you are trying to do. I am no AppleScript expert. There might be easier ways to get the same result.

Best,

Pierre Bernard

Houdah Software s.à r.l.

get path to library folder from user domain

set templatesPath to (result as string) & "Application Support:HoudahSpot:Templates:"

set filePath to templatesPath & "Emails.hspot" as text

set filePath to filePath as alias

set searchString to "Hou"

tell application "HoudahSpot"

        if document "Emails.hspot" exists then

                close document "Emails.hspot"

        end if

        blitzSearch searchString template filePath

end tell


Member #689 original poster
Thanks Pierre, very helpful!