Task Processing

A Bespoke Event consists of a number of individual tasks. When a Bespoke Event runs, tasks are processed starting with the first task, followed by the next task until the last one is processed. This process flow can be altered by using Goto tasks that alter the flow of the Bespoke Event and force processing to jump to the Label specified in the Goto task. E.g.

    • Task1
    • Task2
    • Task3
    • Goto Divert
    • Task4
    • Task5
    • :Divert
    • Task6

Initially Task1 would be processed, then Task2, then Task3. The next Task is a Goto task so processing would then commence at Task6 and once complete the Bespoke Event would end. Task4 and Task5 would never be processed.

Task Types

There are 3 types of Tasks:

  • Command Tasks
  • DataRef Tasks
  • Control Tasks
  • Misc Tasks

When creating tasks, the currently high-lighted Command or DataRef/Variable in the Commands Area or DataRef Area will be used.

Command Tasks

These task types are primary about sending Commands to X-Plane.

Send sends the high-lighted Event to X-Plane.

SendKey sends a specified combination of key-presses to X-Plane. To define a key combination, press and hold any combination of CTRL, ALT, SHIFT, and TAB along with another key. You can also string a large key combination together by creating multiple Key Press tasks in a Bespoke Event. E.g. SendKey LMENU VK_W followed by SendKey VK_M which would bring up the map. Note LMENU stands for the Left ALT key. VK_ stands for virtual keyboard.

SendKey* is the same as above except it uses a slightly different method of transmitting a key press. Use this if SendKey does not work.

SendKeyDn sends a specified combination of key-presses to X-Plane as per SendKey however the keys remain pressed until a SendKeyUp command is sent to release them.

SendKeyUp releases the specified combination of key-presses to X-Plane from a previous SendKeyDn task.

DataRef Tasks

These task types and about changing DataRef values.

Set sets the value of the high-lighted DataRef to a specified number.

Set + increments the value of the high-lighted DataRef by a specified number.

Set - decrements the value of the high-lighted DataRef by a specified number.

Set = sets the value of the high-lighted DataRef to the value of another specified DataRef.

Set * multiples the value of the high-lighted DataRef by a specified number.

Set / divides the value of the high-lighted DataRef by a specified number.

Control Tasks

These tasks are about controlling the flow of execution of the Bespoke Event.

If allows a logical comparison with the high-lighted DataRef and a specified Value. If the result is True, the next Task is processed otherwise it is skipped*.

If Var allows a logical comparison with the high-lighted DataRef and a subsequently selected DataRef. If the result is True, the next Task is processed otherwise it is skipped*.

*These particular tasks require the selection of logical comparison operators. They are:

    • EQUALS (=): The values are the same.
    • NOT EQUALS (!=): The values are not the same
    • GREATER_THAN (>): The first items value is greater than the second items value
    • LESS_THAN (<): The first items value is less than the second items value

Label defines a place in the list of Tasks that can be jumped too by a Goto Task.

Goto allows the Task flow to be diverted to the specified Label Task.

Sleep allows Task processing to pause for a specified amount of milliseconds, allowing X-Plane activity to proceed before the Task processing restarts.

Call allows another Bespoke Event to be executed. Once the called Bespoke Event has finished executing, control returns back to the calling Bespoke Event and any remaining tasks are executed.

Switch, Case, EndSwitch allows for advanced control and must be used together. Switch requires a DataRef to be chosen and then any subsequent Case tasks use a value to match against the DataRef in Switch. When a value matches, any tasks following the Case task are executed until another Case task is reached or EndSwitch is reached. The layout within a Bespoke Event should look as follows:

Switch <DataRef>

Case <Value>:

<Task or Tasks>

Case < Value>:

<Task or Tasks>

repeat as required ......

<EndSwitch>

 

An Example that turns on/off the Flight Director when the auto throttle switch is used. When the throttle is armed, the speed is also set:

Switch fake_aircraft/at_arm

Case 1:

Set fake_aircraft/fd_switch = 1

Set fake_aircraft/speed = 160

Case 0:

Set fake_aircraft/fd_switch = 0

EndSwitch

Misc Tasks

Remark allows you to add comments into your Bespoke Event. They do nothing except save and display a text comment.

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.