I have two standalone in two different devices on a local network.
Standalone "A" has some globals (or global array), let's say "gSport" and "gColor."
Using socket communication, I want to be able to update, from Standalone "B", the values of those globals on Standalone "A".
I already completed the socket communication between the twos, so that's not a problem.
The problem is that I want to decide in Standalone "B" wich globals to update on Standalone "A" (not necessarily all of them).
For example, in standalone "A" I receive an array that contains my data, TheMessage["DATA"] that is:
TheMessage
DATA
gSport Tennis
In standalone "A" how do i capture the name of that global (by reference?) in a script like this, so that at the end the value of global gTennis in standalone "A" is "Tennis"?
Code: Select all
put line 4 of variableNames() into tGlobalList
repeat for each line tKey in the keys of TheMessage["DATA"]
if tKey is among the items of tGlobalList then
put TheMessage["DATA"][tKey] into tVar --this doesn't work since it just update the variable tVar
end if
end repeat