Anyone here script spotlight through applescript?
Randall Lee Reetz
randall at randallreetz.com
Mon Dec 22 21:19:21 EST 2008
I found this online...
> Launch Script Editor (/Applications/AppleScript/Script Editor) and
> enter this text into a new Script Editor window:
>
> set this_appfile to path to me tell application "Finder" set the
> search_string to comment of this_appfile end tell tell application
> "System Events" keystroke " " using {option down, command down}
> delay 1 keystroke search_string end tell
> Save the script as an application. In the Finder select the saved
> application you just created and press Command-I to bring up the
> Info window. Click the triangle next to Comments and enter a
> comment along these lines: “date:today kind:image ” (without the
> quotes but with the space after image so you can easily expand the
> search by adding other data).
>
> Drop the AppleScript application into the Dock and click on it
> whenever you want Spotlight to quickly find any images mucked with
> today. Feel free to experiment with copies of the script by
> entering other values into the Comments field to trigger different
> kinds of searches—“kind:music Rosie Thomas ” or “date:This Month
> Denmark ” for example.
>
> Would like to search the Spotlight index from xtalk.
>
> Any ideas?
>
Randall
More information about the use-livecode
mailing list