Creating search window via AppleScript

Hi,

Is it possible to cause a search window to appear via applescript?

That is, currently I am doing (this is an abridged version of a script I have assigned to a global shortcut)


tell application "DEVONthink Pro"
	activate
	set searchTerm to display dialog "Lookup in DEVONThink:" default answer "" buttons {"Cancel", "OK"} default button 2
	set theResult to search text returned of searchTerm
end tell

and then using “choose from list” and so on to display the results. I’d like to display a normal search window instead so as to be able to use See Also and preview things, but can’t work out how to do it without UI scripting (which I’d rather avoid).

Also, is there an x-url scheme to invoke search? ie, could I just say


open location "x-devonthink-search://SEARCHTERM

or something along these lines? (probably not but doesn’t hurt to ask).

Thanks in advance.

It’s only possible via UI scripting right now.

OK, thanks for the quick reply.