Advertisement
ValveCantCount

program

May 7th, 2015
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.07 KB | None | 0 0
  1. os.loadAPI("phpInterface")
  2. local IOUrl = "softberrykai.com/cc/objc.php"
  3. local function send(url,args)
  4.  phpInterface.setUrl(url)
  5.  local v = phpInterface.sendPostPodyWithArguments(args)
  6.  return v
  7. end
  8.  
  9. local function pullClick()
  10.  local event, button, x, y = os.pullEvent("mouse_click")
  11.  local string = "b"..tostring(button).."x"..tostring(x).."y"..tostring(y).."|eventclick"
  12.  local args = {["label"] = "luas", ["data"] = string}
  13.  --phpInterface.setUrl(IOUrl)
  14.  --phpInterface.sendPostPodyWithArguments(args)
  15.  http.post("http://softberrykai.com/cc/objc.php","label=luas&data="..string)
  16. end
  17.  
  18. local function pullKey()
  19.  local event, code = os.pullEvent("key")
  20.  local string = "k"..tostring(code).."|eventkey"
  21.  local args = {["label"] = "luas", ["data"] = string}
  22.  http.post("http://softberrykai.com/cc/objc.php","label=luas&data="..string)
  23. end
  24.  
  25. local function pullScroll()
  26.  local event, direction, x, y = os.pullEvent("mouse_scroll")
  27.  local string = "d"..tostring(direction).."x"..tostring(x).."y"..tostring(y).."|eventscroll"
  28.  local args = {["label"] = "luas", ["data"] = string}
  29.  http.post("http://softberrykai.com/cc/objc.php","label=luas&data="..string)
  30. end
  31.  
  32. local function pullDrag()
  33.  local event,button,x,y = os.pullEvent("mouse_drag")
  34.  local string = "b"..tostring(button).."x"..tostring(x).."y"..tostring(y).."|eventdrag"
  35.  local args = {["label"] = "luas", ["data"] = string}
  36.  http.post("http://softberrykai.com/cc/objc.php","label=luas&data="..string)
  37. end
  38.  
  39. local function pullInsert()
  40.  local event,side = os.pullEvent("disk")
  41.  local string = "s"..side.."|eventdiskinsert"
  42.  local args = {["label"] = "luas", ["data"] = string}
  43.  http.post("http://softberrykai.com/cc/objc.php","label=luas&data="..string)
  44. end
  45.  
  46. local function pullEject()
  47.  local event,side = os.pullEvent("disk_eject")
  48.  local string = "s"..side.."|eventdiskeject"
  49.  local args = {["label"] = "luas", ["data"] = string}
  50.  http.post("http://softberrykai.com/cc/objc.php","label=luas&data="..string)
  51. end
  52.  
  53. while true do
  54.  parallel.waitForAny(pullClick,pullKey,pullScroll,pullDrag,pullInsert,pullEject)
  55. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement