No, "var" strings do not work with functions that are not in the same unit
that's why I've put a global "RemainingText" variable in StringUtils1
Another solution is to define a new type in the shared unit :
type MyStr = string;
then use only this kind of variable instead of string.
But when you have to pass a string to a predefined function (GetPage, etc.) you will have to copy the MyStr-typed variable to a string-typed variable.
Some time ago I wanted to update to v3 but there were lots of changes to do.
Now that I made the script part of AMC more complex, the update would require even more work.
It is not a high priority for me, since the script system works quite well as it is.