As per the title – I’m wondering if it would be simple to create a script that adds a specific Tag, to all the currently open windows/files?
This would then allow one to call up a Search of all those tagged files, and then run a search through them. As mentioned before, in the absence of a way to search through already open PDF files (as individual windows), this would presumably solve that challenge?
I again spent longer than I needed to, manually working my way through many open windows, looking for a phrase I know I had read recently – so am thinking of a way to speed this process up…
set ot to AppleScript's text item delimiters
tell application id "DNtp"
if ((count document windows) > 0) then
set newTags to (text returned of (display dialog "Enter new Tags separated by a semicolon:" & return & " Ex. ad hoc; one; two; Mozart, Amadeus" default answer ""))
if newTags ≠ "" then
set AppleScript's text item delimiters to "; "
set newTags to text items of newTags as list
set AppleScript's text item delimiters to ot
repeat with thisWindow in (content record of document windows)
set (tags of thisWindow) to (tags of thisWindow & newTags)
end repeat
else
display alert "No tags entered."
return
end if
else
display alert "No document windows are open."
end if
end tell