# Scripting

## Examples <a href="#examples" id="examples"></a>

All examples can be seen[ here](https://docs.dbnetsoft.com/dbnetsoft/raceresultexchange/scripting/examples).

## Alternative

Insteaf of using the built-in *FDS MLED* device that allows to specifiy line nr and script, one can also use the *Custom* display device.&#x20;

In order to create an output on the FDS MLED, one can use the mled.CreateProtocol function. An example is this script

```
{{
now = date.Now
if now.Second  %2 == 0
    nowString = now | Format "HH:mm"
else
    nowString = now | Format "HH mm"
end
nowString = nowString | TrimPad 8 "Center"

# This will generate an FDS MLED compatible output
mled.CreateProtocol nowString 1 "Bright" 
}}
```
