Hello,
I'm trying to save the content of a Safari page into a variable, so I can quickly search it for a specific term and do something based on the results. I've been trying to clunk my way through it with AppleScript, but am getting errors (because I have only the faintest sliver of a hint of what I'm doing).
I've been trying to adapt this method to suit my needs, in this way:
set the webpage_content to ""
tell application "Safari" to set the webpage_content to the text
tell application "Keyboard Maestro Engine"
set the value of variable "pageContent" to the text
end tell
And am getting this error:
error "Keyboard Maestro Engine got an error: Can’t make text into type text." number -1700 from text to text
What simple thing am I misunderstanding?
Thank you
(I wish I'd payed better attention in college, and had continued after graduation. I really ought to buckle down, buy a book, and start learning this stuff properly.)