dictionary:events:createevent
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
dictionary:events:createevent [2021/02/15 13:23] – added parameter example James Sentman | dictionary:events:createevent [2021/02/15 13:26] – [Passing Parameters To A Handler Example] James Sentman | ||
---|---|---|---|
Line 32: | Line 32: | ||
==Passing Parameters To A Handler Example== | ==Passing Parameters To A Handler Example== | ||
- | if you had a global script named “global test script” with a handler named “doThing” like this: | + | if you had a global script named “meal manager” with a handler named “mealLogger” like this: |
< | < | ||
- | on doThing( theName, theEvent) | + | on mealLogger( theName, theEvent) |
- | write log theName & “ has “ & theEvent | + | write log theName & “ has had “ & theMeal |
end doThing | end doThing | ||
</ | </ | ||
- | and created an event such as this: | + | and then created an event such as this: |
< | < | ||
- | create event “do thing test” that executes script “global test script” handler “doThing | + | create event “breakfast” that executes script “meal manager” handler “mealLogger" |
</ | </ | ||
in 10 minutes you would see output in the log like: | in 10 minutes you would see output in the log like: | ||
- | jamie has breakfast | + | **jamie has had breakfast** |
===History: | ===History: | ||
The optional “handler” parameter was added in XTension 9.4.21 | The optional “handler” parameter was added in XTension 9.4.21 |
dictionary/events/createevent.txt · Last modified: 2023/02/13 14:52 by 127.0.0.1