Member
2013-08-12, 04:01 PM
Thanks, Rob - that worked like a champ!
Here's the method I rolled your suggestions up into. Note that this is within a shape, so tell application id "OGfl" is implicit.
on getScriptFromObject(_object)
set _textScript to (script of _object) as text
set _scriptObject to "script" & linefeed & _textScript & linefeed & "end script"
return run script _scriptObject
end getScriptFromObject
Example of calling the method foo() in the script of an object referenced by the variable "o"
set oScript to getScriptFromObject(o)
get foo() of oScript