Applies to: Docklight Scripting, Article ID: dl_faq022
The OnSend / OnReceive features in Docklight Scripting can help out here. Basically there two different alternatives: 1.) Use a DL_OnReceive() procedure to decide what to do after Docklight receives a request for data from the other device. Inside the DL_OnReceive() function, you can decide for yourself what Send Sequence should be transmitted, or if you want to provide random data for a Send Sequence with wildcards. 2.) If you prefer to have something like a “Send” button that spits out a different sequence every time it is pushed, have a look at the “Flexible Answers” demo script provided below. This example project and script shows how you can build a list of individual sequences that are assigned to a “master” button. Each time the master button is pressed, a different sequence is transmitted.