The simulator.createCommand()
method creates a new command, returning an object that can then be used to activate the command. If the command already exists, then the existing command is returned.
name, description
name
: The name of the dataref, e.g. lee/custom/warp_switch_on
description
: A description of the function of this button. This will be visible to users in the interface.A Command
object is returned.
> go_faster_button = "lee/button/go_faster", "Press a button to significantly increase velocity"
Command
> "begin",
undefined
>
Going faster!
undefined
Command
object, returned by this functionXPLMCreateCommand
is the C-API used by this function.create_command
functioncreateCommand