This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
danielsv03's profile picture

Insert help

Started by danielsv03, 31 March 2018 - 02:50 PM
danielsv03 #1
Posted 31 March 2018 - 04:50 PM
Hello, So basicly i have a sort of dictionary in a dictionary sort of table like this

icons = {
["painter_prog"] = {path = "root/system/Apps/painter/paint.icon"; config = "root/system/Apps/painter/Config.conf"; prog = "root/system/Apps/painter/painter.exf"};
["lua_shell_prog"] = {path = "root/system/Apps/Lau_Shell/lua_shell.icon"; config = "root/system/Apps/Lau_Shell/Config.conf"; prog = "root/system/Apps/Lau_Shell/Lua_Shell.exf"};
["Settings_prog"] = {path = "root/system/Apps/settings/settings.icon"; config = "root/system/Apps/settings/Config.conf"; prog = "root/system/Apps/settings/settings.exf"};
}

Right now for each line i'm adding them manually but i want it to be bale to add them automaticly via a program for example for a like an appstore program where for each app it will add the programs to that table automaticly

Thanks!
EveryOS #2
Posted 31 March 2018 - 05:05 PM
Try the textutils.serialize and fs.open functions
danielsv03 #3
Posted 31 March 2018 - 05:51 PM
Try the textutils.serialize and fs.open functions
Yeah but how would i go from there?
Lupus590 #4
Posted 31 March 2018 - 06:05 PM
fs.list every directory in root/system/apps

for each item in the list make an entry in your table for it