Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --This program will detect the
- --methods of peripherals
- --attached to the PC
- --Author: FunnyBunnyofDOOM
- function saveMethods(side)
- SIDE = side or "back"
- methodTable = peripheral.getMethods(SIDE)
- file = fs.open("/BunnyOS/documents/Methods",'a')
- file.write(methodTable)
- file.close()
- print("Methods saved for side "..SIDE)
- end
- sideInput() -- Asks the user what side to scan
- print("What side should I scan?")
- local scanSide = io.read()
- print("scanning the "..scanSide.." side")
- saveMethods(scanSide)
- os.sleep(2)
- print("Methods saved to /BunnyOS/documents/Methods")
- os.sleep(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement