Update Program.md

This commit is contained in:
Robert Jelic
2022-07-02 22:07:02 +02:00
committed by GitHub
parent 95a4164755
commit 5a4e1f3b61

View File

@@ -114,6 +114,7 @@ Injects multiple events
#### Usage:
* injects a multiple char events by clicking a button
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aProgram = mainFrame:addProgram("myFirstProgram"):execute("rom/programs/shell.lua"):show()
@@ -126,6 +127,7 @@ local events = {
mainFrame:addButton("myFirstButton"):setText("inject"):onClick(function() aProgram:injectEvents(events) end):show()
```
## getQueuedEvents
If the program is paused, incomming events will be inserted into a queued events table. As soon as the program is unpaused, the queued events table will be empty