Question: applescript property of called script not changing after loading and running
I have two scripts, callingScript and CALLEDscript. I want callingScript to be able to get any updated values of CALLEDscript properties but cannot get this to work.
My current test versions of the two scripts are:
display dialog "this is the start"
set theOtherScript to load script alias ((path to desktop as text) & "CALLEDscript.scpt")
run script theOtherScript
display dialog "this is nearly the end"
set receivedMessage to (theMessage of theOtherScript)
-->"blank to start with"
property theMessage : "blank to start with"
display dialog "Hello"
set theMessage to "no longer blank now"
Can someone please explain what I am doing wrong?
MacBook Pro with Retina display, OS X El Capitan (10.11.6)