Spotlight search... how to

Good evening everybody

I am totally new to this and hope to understand something about scripting after I see how this is done:

I am in Filemaker and have copied the name of a .pdf file

What I want is:
go to spotlight
find the file I’ve just copied the name from
open it in acrobat

how to do this?

greetz

Dick

do shell script "mdfind nameofpdf"

for only pdf files:

set thename to "nameofpdf"
set theext to "pdf"
set thecmd to "mdfind  'kMDItemDisplayName == " & quote & thename & "*" & quote & "wc" & " && (kMDItemFSName == " & quote & "*." & theext & quote & ")'"
do shell script thecmd

for opening it you can use
tell app “Acrobat” to open…
or
do shell script “open…”
learn more about mdfind:
http://macscripter.net/viewtopic.php?id=24765