• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AppleScript Newbie with a Spotlight (Mac) problem.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: AppleScript Newbie with a Spotlight (Mac) problem.
  • Next by Date: Can we open a Message Viewer window if one is not opened
  • Previous by thread: Re: AppleScript Newbie with a Spotlight (Mac) problem.
  • Next by thread: Can we open a Message Viewer window if one is not opened
  • Index(es):
    • Date
    • Thread