os.pullEvent

From ComputerCraft
Jump to: navigation, search

os.pullEvent
Function
Syntax
os.pullEvent()
Returns {...}
API os
Source CC:Tweaked

Under OS execution, takes argument filter and waits for the current process to be resumed with a vararg list where the first element matches filter. Under sandboxed execution, returns {...} to the application that has resumed the process. Unlike os.pullEventRaw, it will stop the application upon a "terminate" event.

ExampleExampleGet mouse_click event
Prints a mouse_click event
Code
local event, e1 = os.pullEvent("mouse_click")
print(event)
print(e1)