CommandFusion Wiki

Documentation Resources

User Tools

Site Tools


Sidebar

software:modules-and-examples:slider-javascript

Slider JavaScript

This is an example of how to call JavaScript functions from a slider.

Usage

  1. Create a command in a system that you want to send. This could be a loopback system if you don't want the command itself to send any data (just the script instead).
  2. Enter [sliderval] within the 'value' property of the command. This is a special token that sliders can use within commands.
  3. In the JavaScript property of the command, you can call any JavaScript function in your code, and use the predefined data variable, which will contain whatever the command's 'value' returns, which in this case is the slider value.

See the JS API docs for more info on the execution context of JavaScript within commands: http://commandfusion.com/docs/scripting/startup.html#command_send_handler

This example project also demonstrates bitwise operations such as bitshifting and logical AND expression within JavaScript for complex bit level communications.

View the project on our GitHub.

software/modules-and-examples/slider-javascript.txt · Last modified: 2017/03/21 22:05 by jarrod