Page 1 of 1
Trouble with runprogram
Posted: Sun Oct 13, 2024 4:01 pm
by Jeromyal
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.
Re: Trouble with runprogram
Posted: Sun Oct 13, 2024 8:39 pm
by Piero
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\")
Re: Trouble with runprogram
Posted: Mon Oct 14, 2024 1:17 am
by Jeromyal
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.
Re: Trouble with runprogram
Posted: Mon Oct 14, 2024 2:26 am
by AZJIO
Code: Select all
GetCurrentDirectory(~"\".\\installs\\" + GetGadgetItemText(#field, selected) + ~"\\Vintagestory.exe\"")