You can use rednet to do it.
rednet.receive() to receive an order from your pocket computer, and rednet.send(computerID, message) to send message as an order to your computer.
Take a look at
http://computercraft...iki/Rednet_(API)
It could help you for the syntax :)/>
For example :
local senderID, message = rednet.receive()
if message == "Order1" then
print("Executing the first order.")
elseif message == "Order2" then
print('Executing the second order.")
elseif message == "Order3" then
print("Executing the third order.")
end
for receiving and execute the order, and :
rednet.send(6,"Order1")
rednet.send(6,"Order2")
rednet.send(6,"Order3")
to send the order 1, 2 and 3 to the computer 6.
To get a computer's ID, type id.
To preset a function do :
function action1()
print("This is the action 1.")
end
action1() -- Will execut what is in the action1() function, here it will print "This is the action 1."
Edit: Don't forget to type rednet.open("back") at the start of the program for your pocket computer and rednet.open(side) for your computer, where side is the side where is located the modem.