Improve code generator scripts to support converting ScriptString.