Im trying to open the app Skim from Alfred and search for a particular phrase:
on run argv
set theQuery to item 1 of argv
tell application "Skim"
activate
open "/Users/username/Dropbox/xys.pdf"
set foundText to find front document text theQuery
select foundText with animation
end tell
end run
This kind of works, it 'finds' one instance of the word and highlights it.
However I would like it to 'search' for all instances of the word and show the results in the left hand side pane.
Any ideas how to modify my applescript to achieve this?
The comments above have already said that without the use of GUI scripting, displaying the found cases of the word/text in the panel on the left is impossible.
It is possible, however, without GUI scripting, to find and select (highlight) the word/text in all pages of the document. At the request of the user @Deon O'Brien, I am publishing this solution.