Spotlight to me is a near-perfect tool with a less than perfect user interface.
To invoke some UI-alternatives, I want to read the content of Spotlight search and results fields with applescript to paste that into the other tools.
However, I find them difficult to reference.
Does anybody know how to do that…?
Hi
This is a bodge and it is not scripting spotlight but might help. I have to change the names of image whose names are the same but scattered axcross a hard disk. I find them using spotlight, highlight them and then run this script
display dialog "Enter new name" default answer ".jpg"
set newname to text returned of result
tell application "Finder"
set theList to get selection as list
repeat with i from 1 to number of items in theList
set this_item to item i of theList
my changename(newname, this_item)
end repeat
end tell
on changename(newname, targetfile)
tell application "Finder"
set name of targetfile to newname
end tell
end changename
That may help with results window, but I am looking to retrieve content of the text input field (= upper right corner, looking glass !)