Something like:
Code:
set strScript to "script" & linefeed & (script of oShape) as string & linefeed & "end script"
set objScript to run script strScript
You can than call methods from the script object which you have created from the shape's script using the
of idiom.
Code:
FnSomeHandler() of objScript