Link to Spotlight / pre-populate search box

Joined
Nov 1, 2017
Messages
5
Reaction score
0
Points
1
In my web browser, I execute a perl script that resides on my remote web server. One of the things the script does is collect filenames and arrange them into a search string that I can copy and paste into my Mac Spotlight search bar. A typical search string looks like: "name:1301443.tif OR name:1280582.tif OR name:1925245.tif OR name:1364575.tif OR name:1327199.tif"

When I copy the search string from the browser page and paste it into Spotlight, it finds these files on my Mac and allows me open them all at once. I use this several times per day to find, open, and work on these files.

Copying and pasting the search string is no big deal, but I wonder whether I could instead create a browser link that, with one click, would 1) open Spotlight on my desktop and 2) pre-populate the Spotlight search box with my search string?

Can anyone help me with a Mac path or string that would achieve that?

Thanks!
 

pigoo3

Well-known member
Staff member
Admin
Joined
May 20, 2008
Messages
44,213
Reaction score
1,424
Points
113
Location
U.S.
Your Mac's Specs
2017 15" MBP, 16gig ram, 1TB SSD, OS 10.15
Just wanted to let you know that your question/post is being viewed...but it's an unusual question...and many folks may not know a solution. Hopefully someone will chime in.:)

- Nick
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,771
Reaction score
2,111
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
One thing that would've worked is using Applescript or Shortcuts to tell Spotlight what the search string is. But Spotlight is a subordinate function of Finder, so you'd have to use a keyboard shortcut to bring it up and then somehow select the search window and paste your search string in it.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top