Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArg = {...}
- local Name = tArg[1]
- local File = tArg[2]
- local Image = tArg[3]
- local x = 1
- local y = 1
- local w, h = term.getSize()
- local Items = fs.list("os/System/Saved/Shortcuts")
- y = #Items / 5
- x = #Items - (y * 5)
- if #Items < 6 then
- y = 1
- x = #Items
- end
- x = x * (w / 5)
- y = (y * 6) - 3
- if Image == "blank" then
- Image = "os/System/Defaults/Images/BlankShortcut"
- end
- local Short = fs.open(fs.combine("os/System/Saved/Shortcuts",Name),"w")
- Short.writeLine(Name)
- Short.writeLine(File)
- Short.writeLine(Image)
- Short.writeLine(x)
- Short.writeLine(y)
- Short.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement