Re.: Leopard-Spotlight-Applescript

Daniel Rodrigue danrod at mac.com
Mon Mar 2 07:55:33 EST 2009


Hi Jim,

On Nov 05, 2007, at 13:00, Jim Sims <sims at ezpzapps.com> wrote:

> Looks like I will not have a copy of Leopard very soon
> (living on far & distant planets has pluses and minuses)
> so could some kind soul please test the following Applescript
> on Leopard for me?
>
> If it works it will open a spotlight search for "bob".

You could use shell script to achive the same thing:

on mouseUp
    put "bob" into sQuoi
    put "mdfind kMDItemFSName == '" & sQuoi & "'" into tCMD
	// mdfind kMDItemFSName == 'bob'
    put shell(tCMD)
end mouseUp

Not that I don't like AppleScript, I'm an heavy user of it, but I  
always try to avoid using the "Finder".

You should look at those command: "mdfind", "mdimport", "mdls",  
"mdutil".

Regards,

Dan

--/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\--
Daniel Rodrigue / Simple & Logik
Vox: 450-468-5726 • cel: 514-996-5726
1261 rue Bourgeoys, Longueuil  (Québec) Canada J4M 1Z5
••••••••••••••••••••••••••••••••••••••••••••••••••••••
“Quidquid latine dictum sit, altum sonatur.”
“Peu importe, dit en latin ça sonne profond.”
“Whatever is said in Latin sounds profound.”
--\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/--




More information about the use-livecode mailing list