Re: AppleScript Newbie with a Spotlight (Mac) problem.
Re: AppleScript Newbie with a Spotlight (Mac) problem.
- Subject: Re: AppleScript Newbie with a Spotlight (Mac) problem.
- From: Steve Mills <email@hidden>
- Date: Tue, 31 May 2016 14:58:01 +0000 (GMT)
On May 31, 2016, at 09:22 AM, Francis Nugent Dixon <email@hidden> wrote:
Hi !
I use Revolution LiveCode to write all my programs,
and I can't think of a way to get over my problem.
On my Mac, I want to call Spotlight, and channel the
output to a text file, but I don't think it is possible.
What I want to do with the text output is not important.
The rest I will do in LiveCode.
I have not found any method of getting a text file when
running Spotlight under Mac OS X.
Is there a way of doing this with an AppleScript script ?
One way would be to call the mdfind command from AppleScript:
set thingToFind to "Univac"
do shell script "mdfind '" & thingToFind & "' > /Users/youruser/blah.txt"
set spotlightResult to read "/Users/youruser/blah.txt"
See "man mdfind" to learn how to set the query to something more specific.
Sent from iCloud's ridiculous UI, so, sorry about the formatting
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden