-
Notifications
You must be signed in to change notification settings - Fork 0
/
3DPrinterRow
54 lines (38 loc) · 1.05 KB
/
3DPrinterRow
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
filer=io.open("listp","r")
cont=filer:read("*all")
filer:close()
component = require("component")
shell = require("shell")
tablo = {}
folder = "/home/benz/"
name = "benz"
itemslot = 1
component = require("component")
inv = component.transposer
function mysplit (inputstr, sep)
if sep == nil then
sep = "%s"
end
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
table.insert(tablo, str)
end
end
mysplit(cont, "!")
for rn = 1, #tablo do
local fio = io.open(folder..name..rn..".3dm","w")
fio:write(tablo[rn])
fio:close()
print("_______________________________"..rn.."____________________________________")
os.sleep(3)
os.execute("print3d "..folder..name..rn..".3dm")
founds = false
while founds == false do
if inv.getSlotStackSize(2, 3) > 0 then
founds = true
inv.transferItem(2, 3, 1, 3, itemslot)
itemslot = itemslot+1
print("Transfer Complete!!!1")
end
os.sleep(2)
end
end