Difference between revisions of "Os.queueEvent"
From ComputerCraft Wiki
Line 10: | Line 10: | ||
|desc=The program adds an event which it will eventually pull. | |desc=The program adds an event which it will eventually pull. | ||
|code= | |code= | ||
− | + | os.queueEvent("abc", 2, "meow") | |
− | + | ||
− | + | ||
− | + | ||
while true do | while true do | ||
− | + | local event, param1, param2 = os.pullEvent() | |
− | + | if event == "abc" then | |
− | + | print("ABC EVENT! Parameters: "..param1.." / " ..param2) | |
− | + | else | |
− | + | print("Event: " .. event ) | |
− | + | end | |
− | + | end | |
}} | }} | ||
}} | }} |
Revision as of 13:41, 28 November 2012
Function os.queueEvent | |
Adds an event eventName with the specified parameters to the event queue. | |
Syntax | os.queueEvent(string eventName, param1, param2, param3) |
Returns | nil |
Part of | ComputerCraft |
API | os |
Examples