Just starting out? Need help? Post your questions and find answers here.
Jeromyal
Enthusiast
Posts: 216 Joined: Wed Jul 17, 2013 8:49 am
Post
by Jeromyal » Sun Oct 13, 2024 4:01 pm
When I use this
Code: Select all
RunProgram(~"\".\\installs\\" + GetGadgetItemText(#field, selected) + ~"\\Vintagestory.exe\"", ~"--dataPath=\"userData\"", ".\\installs\" + GetGadgetItemText(#field, selected))
The game opens but only renders the top left quarter of the game in the top left quarter of the screen.
Has anyone had and solved this issue.
Piero
Addict
Posts: 862 Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy
Post
by Piero » Sun Oct 13, 2024 8:39 pm
Dunno about the rendering problems, but ".\\installs\"
Code: Select all
~"--dataPath=\"userData\"", ".\\installs\" + GetGadgetItemText(#field, selected))
seems malformed (no ~)… did you mean:
Code: Select all
~"--dataPath=\"userData\"", ~"\".\\installs\\\"" + GetGadgetItemText(#field, selected))
? (or ".\installs\")
Jeromyal
Enthusiast
Posts: 216 Joined: Wed Jul 17, 2013 8:49 am
Post
by Jeromyal » Mon Oct 14, 2024 1:17 am
Thank you for catching that Piero.
I added ~ to correct that. Does not fix the graphical issue but I am now sending a Propper quoted path of a working directory to RunProgram now.
GetGadgetItemText(#field, GetGadgetState(#field)) returns a directory name that contains spaces.
I guess I had already made many changes to that command since the initial post, but that error you found was still there.
AZJIO
Addict
Posts: 2141 Joined: Sun May 14, 2017 1:48 am
Post
by AZJIO » Mon Oct 14, 2024 2:26 am
Code: Select all
GetCurrentDirectory(~"\".\\installs\\" + GetGadgetItemText(#field, selected) + ~"\\Vintagestory.exe\"")