Hello,
I'm experimenting a little bit with XML.SetValue option and I have the following problem:
xmlscenery = SessionVar.Expand("%MyDocumentsFolder%");
-- You can then use this Lua variable to reference the file.
XML.Load(xmlscenery.."\\Prepar3D v4 Add-ons\\TestAddon\\add-on.xml", "", SW_SHOWNORMAL);
XML.SetValue("SimBase.Document/AddOn.Component/Path", SessionVar.Expand("%AppPath%\\Ecosystem\\Scenery"))
xmlscenery = SessionVar.Expand("%MyDocumentsFolder%");
-- You can then use this Lua variable to reference the file.
XML.Save(xmlscenery.."\\Prepar3D v4 Add-ons\\TestAddon\\add-on.xml", "", SW_SHOWNORMAL);
I set the variable on startup using this:
SessionVar.Set("%AppFolder%", Registry.GetValue(HKEY_CURRENT_USER, "SOFTWARE\\Lockheed Martin\\Prepar3D v4", "AppPath", true));
And would like to place it in StringValue with some additional paths after it in the XML file.
What i get in final is just text. It may be probably easy to solve but I cant figure it out yet.
Thank you,
Mateusz
I'm experimenting a little bit with XML.SetValue option and I have the following problem:
xmlscenery = SessionVar.Expand("%MyDocumentsFolder%");
-- You can then use this Lua variable to reference the file.
XML.Load(xmlscenery.."\\Prepar3D v4 Add-ons\\TestAddon\\add-on.xml", "", SW_SHOWNORMAL);
XML.SetValue("SimBase.Document/AddOn.Component/Path", SessionVar.Expand("%AppPath%\\Ecosystem\\Scenery"))
xmlscenery = SessionVar.Expand("%MyDocumentsFolder%");
-- You can then use this Lua variable to reference the file.
XML.Save(xmlscenery.."\\Prepar3D v4 Add-ons\\TestAddon\\add-on.xml", "", SW_SHOWNORMAL);
I set the variable on startup using this:
SessionVar.Set("%AppFolder%", Registry.GetValue(HKEY_CURRENT_USER, "SOFTWARE\\Lockheed Martin\\Prepar3D v4", "AppPath", true));
And would like to place it in StringValue with some additional paths after it in the XML file.
What i get in final is just text. It may be probably easy to solve but I cant figure it out yet.
Thank you,
Mateusz
Comment