20,741
edits
m (→Introduction) |
mNo edit summary |
||
| Line 43: | Line 43: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Now, to send a message, you would only need to modify the property - for example, by using setprop: | |||
<syntaxhighlight lang="php"> | |||
setprop('/sim/cockpit/eufd', 'Hello World'); | |||
</syntaxhighlight> | |||
But you could also create a wrapper named "sendMessage" for this purpose: | |||
<syntaxhighlight lang="php"> | |||
var sendMessage = func(msg) { | |||
print("Sending message:", msg); | |||
setprop('/sim/cockpit/eufd', msg); | |||
} | |||
</syntaxhighlight> | |||