I managed to do it using this method:
script Transfer:
Code: Select all
:local scrName "scriptReceiver"
:local Var1 "Par1=mytext"
:local Var2 "Par2=12"
:execute script="[[:parse \"[:parse [/system script get $scrName source]] $Var1 $Var2\"]]"
Code: Select all
:log warning "$Par1 $Par2"
:log warning [:typeof $Par1]
:log warning [:typeof $Par2]
:local Par3 [:tonum $Par2]
:log error $Par3
:log error [:typeof $Par3]
:execute is clearly redundant, it is enough [[:parse \"[:parse [/system script get $scrName source]] $Var1 $Var2\"]]
From my experience, it can be seen that
1. all parameters are passed as string parameters and after catching them, the receiver script must convert their type back, knowing it in advance.
2. And secondly, strings can only be transmitted in Latin. I was unable to pass string parameters in the national language (say Cyrillic).
Questions:
1. Is there any way to do this more gracefully? (without global variables and functions).
2. And is it possible to somehow pass parameters with their types (not only in string form) and pass the Cyrillic alphabet? I tried to transfer Cyrillic alphabet in HEX format like \D0\E1, etc... - it doesn't work.