Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local peripheralSide = "left"
- local file = fs.open("Function List.txt", "w")
- function monitorSearch()
- local names = peripheral.getNames()
- local i, name
- for i, name in pairs(names) do
- if peripheral.getType(name) == "monitor" then
- test = name
- return peripheral.wrap(name)
- else
- --return nil
- end
- end
- end
- local mon = monitorSearch()
- local test = peripheral.isPresent(peripheralSide)
- local x = 1
- local y = 1
- mon.write(test)
- mon.clear()
- mon.setCursorPos(x,y)
- for i,v in ipairs(peripheral.getMethods(peripheralSide))
- do mon.write(i..". "..v)
- file.writeLine(i..". "..v.."()")
- y = y + 1
- mon.setCursorPos(x,y)
- end
- y = y + 1
- mon.write(peripheral.getType(peripheralSide))
- file.close()
Add Comment
Please, Sign In to add comment