JavaScript actions

JavaScript "actions" are performed using a number of predefined classes that provide the interface between the script and the plugin functionality.

The available classes are:

  • ui - Everything (except layouts) related to editor properties, button and dial states and values.
  • layout - Everything related to dial layouts.
  • midi - Everything related to midi 
  • gvar- Global variables
  • timer - Timers
  • io - keyboard/file/clipboard things
  • list - dial list things
  • path - various file path operations and constants
  • console - gives the ability to write entries in the plugin log file.

Several actions reference dropdown options, and these actions must define the available dropdown options exactly as they appear in the dropdown, case-sensitive. The easiest way to get the correct text for these actions is to select the option in the dropdown, then right-click the dropdown. This copies the selected option name to the clipboard, and you can paste it into the script action.

Actions

  • ui.text(string value, bool upper = false)
  • ui.title(string value) 
  • ui.design(string path)
  • ui.image(string path)
  • ui.value(int value, bool forWhilePressed = false) 
  • ui.vu(int value, string text = null) 
  • ui.vuscale(string value) 
  • ui.vpotspan(string value)
  • ui.minmax(int min, int max, bool forWhilePressed = false) 
  • ui.speed(int value) 
  • ui.titlevalueposition(string value) 
  • ui.iconleft(string path)
  • ui.iconright(string path)
  • ui.display(string value, bool forWhilePressed = false)
  • ui.largeicons(bool value)
  • ui.vpotsizefull(bool value)
  • ui.vpotendless(bool value) 
  • ui.avoidfader(string value) 
  • ui.step(string algorithm, bool forWhilePressed = false) 
  • ui.step(string algorithm, int stepsize, bool forWhilePressed = false);
  • ui.valuedisplay(string value, bool forWhilePressedOrUpper = false) 
  • ui.icon(string path, int? size = null, int? x = null, int? y = null, bool upper = false)

The vpot and fader subobjects are "convenient" objects that can be used to make scripts clearer by denoting which kind of object is referenced, but they affect the same properties as the non-prefixed settings. Examples:  ui.vpot.endless affect the same value as ui.vpotendless. ui.design, ui.vpot.design and ui.fader.design all affect the "Design" dropdown.

  • ui.vpot.endless(bool value)
  • ui.vpot.sizefull(bool value)
  • ui.vpot.span(string value)
  • ui.vpot.minmax(int min, int max, bool forWhilePressed = false) 
  • ui.vpot.speed(int value)
  • ui.vpot.design(string path)
  • ui.vpot.step(string algorithm, bool forWhilePressed = false)
  • ui.vpot.step(string algorithm, int stepsize, bool forWhilePressed = false)
  • ui.vpot.value(int value, bool forWhilePressed = false)
  • ui.fader.minmax(int min, int max, bool forWhilePressed = false)
  • ui.fader.speed(int value)
  • ui.fader.design(string path)
  • ui.fader.step(string algorithm, bool forWhilePressed = false)
  • ui.fader.step(string algorithm, int stepsize, bool forWhilePressed = false)
  • ui.fader.value(int value, bool forWhilePressed = false)