Advertisement
CoLDarkness

PDA

Sep 6th, 2012
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. receiver.setChannel("Channel")
  2. receiver.setName("C-Provider")
  3. while true do
  4. local event, id, key = os.pullEvent()
  5. if event == "pda_connected" then
  6. receiver.setIcon(1, id)
  7. receiver.setText(0, "Welcome to C-Provider", id)
  8. elseif event == "pda_key" and key == 19 then
  9. receiver.setText(0, "Rebooting...", id)
  10. os.reboot()
  11. elseif event == "pda_key" and key == 23 then
  12. receiver.setText(0, "Changing icon...", id)
  13. receiver.setIcon(3, id)
  14. elseif event == "pda_key" then
  15. receiver.setText(0, "Pressed key: " .. key, id)
  16. end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement