I done 3 scripts for create and work with multiple global variables
On for create each
One for Change the content of each
One for return the content of each
Maeby someone have a best way.
Maeby with array i don't know really at the moment.
I believe i make progress in english Isn't it ?

Regards
Jean-Marc
Code: Select all
--•• Create a list of global variables
on dBuildSomeGlobalVar pNomGlob,pPrefixGlob --•• pNomGlob = a list of names of globals. One items for one global
-- put pNomGlob into LesNomG
put the num of items of pNomGlob into nb
repeat with i = 1 to nb
put item i of pNomGlob into LaL
put empty into fld Lal
put pPrefixGlob & Lal into UneG
put "Global"&&UneG into LeMes
do LeMes
put "put empty "&&"into"&& uneG into LeMes
do LeMes
end repeat
end dBuildSomeGlobalVar
--•• Change the content of each global variables
on dChangeSomeGlobalVar pNomGlob,pContent,pPrefixGlob --•• pContent = a list of contents for each global. One items for one content for one global
put the num of items of pNomGlob into nb
repeat with i = 1 to nb
put item i of pNomGlob into LaL
put pPrefixGlob & LaL into UneG
put "Global"&&UneG into LeMes
do LeMes
put "put item i of pContent "&&"into"&& uneG into LeMes
do LeMes
end repeat
end dChangeSomeGlobalVar
--•• return the content of each global variables
on dShowContentSomeGlobalVar pNomGlob,pPrefixGlob
put empty into buf
put empty into bufDef
put the num of items of pNomGlob into nb
repeat with i = 1 to nb
put item i of pNomGlob into LaL
put pPrefixGlob & LaL into UneG
put pPrefixGlob & LaL into uneVar
put "Global"&&UneG into LeMes
do LeMes
-- put "put"&&UneG&&"into fld"&&LaL into LeMes --•• one global into one fld
put "put"&&UneG&&"into"&&"buf" into LeMes --•• one global by line into a variable
do Lemes
put uneVar&&"="&&buf&return after bufDef
end repeat
dansmes bufDef --•• the result in the messagebox
end dShowContentSomeGlobalVar
on Dansmes t --•• a result in the messagebox
put t
end Dansmes