here is just a little code that can be used in a script
It creates a database to store the path of the graphic folder, on first run it will ask the user to find it and store the value, it loads the value when the script starts and checks to make sure it's valid.(If folder is no longer valid it will ask again.)
local savesetting = db:create("graphicfolder", {setting = {gfx = "",_unique = {"gfx"},_violations = "REPLACE"} })
results = db:fetch(savesetting.setting)
if results[1]==nil then
gfx_path = ""
else
gfx_path = results[1]["gfx"]
end
if io.exists(gfx_path)==false then
gfx_path = invokeFileDialog(false, "Find me the gfx folder, please")
db:add(savesetting.setting, {gfx=gfx_path})
end
just thought I would share.