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

Locating All Peripherals On A Wired Network

Started by Zudo, 24 July 2013 - 08:35 AM
Zudo #1
Posted 24 July 2013 - 10:35 AM
I need a script to detect all peripherals on a wired network. Is this possible? If so, how?

Thanks in advance :)/>

- Z
Lyqyd #2
Posted 24 July 2013 - 10:43 AM
peripheral.getNames()

Please read the documentation available on the wiki before asking questions.
theoriginalbit #3
Posted 24 July 2013 - 10:45 AM
and peripheral.getType( name ) will give you the type of the peripheral.
PixelToast #4
Posted 24 July 2013 - 10:46 AM
and peripheral.getType( name ) will give you the type of the peripheral.
you don't say? do we need to explain every single peripheral function in more than one post?

peripheral.call("side","getNamesRemote") for a specific modem
theoriginalbit #5
Posted 24 July 2013 - 10:54 AM
you don't say?
Well he never figured out that there was the functions there … so I figured I'd just make him aware that the standard peripheral.getType works for them too that you don't need to use peripheral.call("side", "getRemoteType", "name") (or the wrapped version of that). No need to be a smart-**se about it!
Zudo #6
Posted 24 July 2013 - 10:55 AM
Thanks :)/>
Lord_Spelunky #7
Posted 26 July 2013 - 11:18 AM
Thanks :)/>
Direwolf20 has a way to do it on his computercraft mod spotlight :)/> If it is still troubling you, that is :)/>