Oh…the thing is, you still have to use rednet whether you want to use cables or modems.
I mean, I guess you could implement some kind of pulsed redstone output code, but that strikes me as a lot more difficult than using the
rednet API. It's actually pretty simple. You open the side where the modem or cable is attached using rednet.open(side) (where side is a string), then you can use rednet.send(ID,message) (ID is a number ID of the receiving computer, message is a string that will be sent) or rednet.broadcast(message) (to send to all computers able to receive), then rednet.receive(timeout) (timeout is how long to wait for a message) returns the sender's ID and the message if it gets a message before timeout, or returns nil (if no timeout is specified, the computer will wait forever if need be–or until you terminate the program somehow).
Here's a simple rednet opening function for modems:
local function opnmdm()
for i,v in pairs(rs.getSides()) do
if peripheral.getType(v) == "modem" then
if not rednet.isOpen(v) then rednet.open(v) end
return true end
end
return false end
I'm not sure what the peripheral type of bundled cable is, or even if it has one. Anyway, with the above function, you can make a simple program like so:
if not opnmdm() then print("Modem Access Error") return false end
local rcID,tvnt = nil
repeat print("Enter receiver ID> ")
rcID = tonumber(read())
until rcID
print("Press Shift+S to send message to "..rcID)
print("Press Shift+R to change receiver ID")
print("Change receiver ID to nil to exit")
while rcID do
tvnt = {os.pullEvent()}
if tvnt[1] == "rednet_message" then print(tvnt[2]..": "..tvnt[3])
if tvnt[3]:find("^send") then rednet.send(tvnt[2],read()) end
elseif tvnt[2] == "S" then write("Enter message> ") rednet.send(rcID,read())
elseif tvnt[2] == "R" then write("Enter new receiver ID> ") rcID = tonumber(read()) end
end
What this does is check all the sides for a modem using the above function, turning on the modem and continuing the program if there is one or exiting if there isn't. It then asks you for an ID (a number) to be the receiver. Then it loops, pulling an event, and printing out the event if it's a rednet message, or allowing you to enter a message or change the receiver if you press Shift+S or Shift+R.
This is, of course, just so that you can get the idea of how rednet messages are sent and received. Though you can use it to do some messaging, or for remote control of another computer that's set up to respond to rednet messages as commands rather than just printing them out.