Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("phpInterface")
- local IOUrl = "softberrykai.com/cc/objc.php"
- local function send(url,args)
- phpInterface.setUrl(url)
- local v = phpInterface.sendPostPodyWithArguments(args)
- return v
- end
- local function pullClick()
- local event, button, x, y = os.pullEvent("mouse_click")
- local string = "b"..tostring(button).."x"..tostring(x).."y"..tostring(y).."|eventclick"
- local args = {["label"] = "luas", ["data"] = string}
- --phpInterface.setUrl(IOUrl)
- --phpInterface.sendPostPodyWithArguments(args)
- http.post("http://softberrykai.com/cc/objc.php","label=luas&data="..string)
- end
- local function pullKey()
- local event, code = os.pullEvent("key")
- local string = "k"..tostring(code).."|eventkey"
- local args = {["label"] = "luas", ["data"] = string}
- http.post("http://softberrykai.com/cc/objc.php","label=luas&data="..string)
- end
- local function pullScroll()
- local event, direction, x, y = os.pullEvent("mouse_scroll")
- local string = "d"..tostring(direction).."x"..tostring(x).."y"..tostring(y).."|eventscroll"
- local args = {["label"] = "luas", ["data"] = string}
- http.post("http://softberrykai.com/cc/objc.php","label=luas&data="..string)
- end
- local function pullDrag()
- local event,button,x,y = os.pullEvent("mouse_drag")
- local string = "b"..tostring(button).."x"..tostring(x).."y"..tostring(y).."|eventdrag"
- local args = {["label"] = "luas", ["data"] = string}
- http.post("http://softberrykai.com/cc/objc.php","label=luas&data="..string)
- end
- local function pullInsert()
- local event,side = os.pullEvent("disk")
- local string = "s"..side.."|eventdiskinsert"
- local args = {["label"] = "luas", ["data"] = string}
- http.post("http://softberrykai.com/cc/objc.php","label=luas&data="..string)
- end
- local function pullEject()
- local event,side = os.pullEvent("disk_eject")
- local string = "s"..side.."|eventdiskeject"
- local args = {["label"] = "luas", ["data"] = string}
- http.post("http://softberrykai.com/cc/objc.php","label=luas&data="..string)
- end
- while true do
- parallel.waitForAny(pullClick,pullKey,pullScroll,pullDrag,pullInsert,pullEject)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement