Gives me an error, saying that the_result is not defined. What am i missing? Searched the forum and every post showing such solution, leads me to the same error message. Did Apple change something?
Im NOT sure what you are doing here as you don’t mention any app. But ‘return’ is reserved for inside of a function. So you need to declare a function have your value returned from inside of this. Call your function.
This worked with Safari for me.
tell application "Safari"
display dialog the result