====== Window Message Client Remote Control ====== The Window Message Client remote control interface provides a mechanism to execute remote control commands through [[https://msdn.microsoft.com/en-us/library/windows/desktop/ff381405(v=vs.85).aspx|Window messages]]. The procotol is designed to work with any kind of server application that can process and forward window messages containing logic data, as explained below. ===== How it works ===== On startup, mAirList will look for a window with the given **WindowName** and send a **RegisterMessage** to it, providing its own window handle. The server application must now send messages of type ''WM_USER'', with an input address as the ''WParam'', and a numeric value as the ''LParam'' parameter. mAirList can also send logic changes back to the server using an optional **SetOutputMessage**. When mAirList is closed, it will send a final **UnregisterMessage** to the server application, unsubscribing from any messages. ===== Configuration ===== Open the standalone configuration app, or the Control Panel, go to the //Remote Control// section, and add a new //Windows Message Client// remote interface. On the //Messages// tab, you can assign received messages to [[reference:remote_control_commands|remote control commands]]: {{ :config:remotecontrol:pasted:20160908-155814.png?400 }} First enter the desired Input (WParam) and Value (LParam), then click //Add// to add the message to the list at the top of the dialog. Now click the //Command// column, and select a remote control from the list, or type one manually. To delete a particular message, highlight it, then click //Delete//. On the //Settings// tab, the window name and message names are specified, according to the requirements of the server application you are using: {{ :config:remotecontrol:pasted:20160908-155911.png?400 }} ===== Scripting ===== The remote control interface provides a procedure to set an output from a script: procedure SetWMClientOutput(iIndex, iNumber, iValue: integer); ''iIndex'' is the index of the WMClient remote in the system (the first has index 0), ''iNumber'' is the number of the output, and ''iValue'' the new value.