Clicky

artimus_aardvark
Hi

I've been trying to script some of the regular actions I need to do on my searches.  The problem I'm getting is that I can't seem to script the opening of my searches I've saved as templates.
Using the script below to open my search brings up a dialogue box which is empty bar a single okay button. 

tell application "HoudahSpot"

        openTemplate "Recent Files" options fresh

end tell


Changing the options from fresh to recycle has no effect on this problem.
Looking in the logs I get this message

12/07/2009 09:42:56 HoudahSpot[2562] ApplicationDelegate.m:663 willPresentError: Error Domain=NSCocoaErrorDomain Code=260 UserInfo=0x17795ec0 "(null)" 

The saved search works fine when it is run from the template menu, so I know thats okay.  Interestingly trying to run one of the pre-made templates also produces this same error.
I am doing something very silly and wrong (I'm still quite new to applescript, so it's probable) or is openTemplate broken?
0 0
houdah
Hi!

I believe you need to specify the full file path for the template.

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
ape
If the template is stored in the default template location (~/Library/Application Support/HoudahSpot/Templates), why does the full name need to be given?  There's obviously already logic within the application itself as to where the templates are stored.

 The full path should only be required if referencing a template outside the default location.

 Just my .02 cents...

Steve
0 0
houdah
Hi!

I wanted to keep with the AppleScript logic of passing around files. One way of getting to a file in AppleScript is specifying a full path.

Of course, referencing the template by name would have worked just as well.

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