Материал из for iRidium developers
Перейти к: навигация, поиск
Эта страница является переводом страницы AMX IRLB Commands. Перевод выполнен на 100%.

Other languages:
English • ‎русский

Dynamic lists in AMX (IRLB commands)

To display lists of music or films. The lists can change during project work.

iRidium dynamic list (List) is a project item on the basis of which you can form the scrolling list from one popup (template). The list items can be added or removed when working with the project.

The number of list items is set up by the controller command and is limited by settings of the graphic item - the list basis. The content of a list item can be changed with the help of special commands.


Preparing the list basis in AMX TPDesign4

Multistate-Bargraph is always use as a list basis:

AMX DinList AddBase1.png

In the Description field of the Multistate-Bargraph item indicate the popup which will be the list item template:

AMX DinList AddTemplate.png

IridiumList=Template_1;

Template_1 - the popup name (the list item template)

In the Programming tab of the Multistate-Bargraph item set up processing of pressings on list items:

AMX DinList AddBase2.png

Address Code

it is used to control the list from the controller.
If you send value 10 to <Address Code> the list is positioned on the 10th item (if there is such item)

Level Code

it is used to monitor pressings on list items. Level Code sends information about which item/subitem is pressed to the controller. If you set up Level Code: 401 and click on the 10th list item, the controller gets value 10 in Level Code: 401. Information about the pressed list subitem comes to the next Level Code: 402. If there are 3 subitems on the 10th item and we pressed the second subitem, then Level Code: 402 gets value 2 (counting from zero: 0 - item basis, 1 - the first subitem, ...)

When pressing on a list item it sends its identifier and the identifier of the pressed subitem to the АМХ controller. The controller processes these two values and activated the corresponding scene

The identifier of the first list item (ID of the first item) is indicated when creating a list with the help of the IRLB_ADD command.

The value selected on a level or joystick will NOT be sent to the controller as only the fact of pressing on the subitem is captured.


IRLB commands: control of lists

IRLB commands is a set of commands which can be sent only to iRidium client applications. They are not understood by standard AMX TouchPanels.


1. Adding the indicated number of items in the list

send_command dvTP, "'IRLB_ADD-<address,count,start_id>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • count - the number of list items you want to create
  • start_id - the identifier of the first list item


Example: create a list of 25 items (the basis - the item with Code:400, the number of items - 25, ID of the first item - 0)

AMX DinList SendAdd.png


2. Removing the indicated item by its ID

send_command dvTP, "'IRLB_DELETE-<address,id>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item you want to remove


3. Removing all items

send_command dvTP, "'IRLB_CLEAR-<address>'" 
  • address - the item address (the list basis - Multistate-Bargraph)


4. Setting up list "resistance" to movement in percentage terms 0-100% (0 - no resistance, 100 - no movement)

send_command dvTP, "'IRLB_RESISTENCE-<address,value>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • value - the value of "resistance" in the range from 0 to 100


5. Setting up the list position

send_command dvTP, "'IRLB_POSITION-<address,id>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item you want to go to


6. Setting up the list color

send_command dvTP, "'IRLB_SCROLL_COLOR-<address,color>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • color - the color (HEX, RGB, the color name)


7. Setting up the horizontal coordinate of the list subitem

send_command dvTP, "'IRLB_ITEM_X-<address,id,subitem,value>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item
  • subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
  • value - the value of the item X coordinate in pixels


8. Setting up the vertical coordinate of the list subitem

send_command dvTP, "'IRLB_ITEM_Y-<address,id,subitem,value>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item
  • subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
  • value - the value of the item Y coordinate in pixels


9. Setting up the width of the list sibitem

send_command dvTP, "'IRLB_ITEM_WIDTH-<address,id,subitem,value>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item
  • subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
  • value - the item width in pixels


10. Setting up the height of the list sibitem

send_command dvTP, "'IRLB_ITEM_HEIGHT-<address,id,subitem,value>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item
  • subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
  • value - the item height in pixels


11. Setting up the subitem color

send_command dvTP, "'IRLB_ITEM_COLOR-<address,id,subitem,color>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item
  • subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
  • color - the color (HEX, RGB, the color name)


12. Setting up opacity of the list sibitem

send_command dvTP, "'IRLB_ITEM_OPACITY-<address,id,subitem,value>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item
  • subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
  • value - the opacity value in the range from 0 to 255


13. Setting up the text of the list subitem in the CP1251 format

send_command dvTP, "'IRLB_ITEM_TEXT-<address,id,subitem,string>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item
  • subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
  • string - the string in the CP1251 format

14. Setting up the text of the list subitem in the Unicode format send_command dvTP, "'IRLB_ITEM_UNI-<address,id,subitem,string>'"

  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item
  • subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
  • string - the string in the Unicode format


15. Setting up the color of the subitem text

send_command dvTP, "'IRLB_ITEM_TEXT_COLOR-<address,id,subitem,color>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item
  • subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
  • color - the color (HEX, RGB, the color name)


16. Setting up alligning of the subitem text

send_command dvTP, "'IRLB_ITEM_TEXT_ALIGN-<address,id,subitem,align>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item
  • subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
  • align - the way of alligning

17. Setting up the subitem image

send_command dvTP, "'IRLB_ITEM_IMAGE-<address,id,subitem,image name>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item
  • subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
  • image name - the name of the image added in the project gallery


18. Setting up alligning of the subitem image

send_command dvTP, "'IRLB_ITEM_IMAGE_ALIGN-<address,id,subitem,align>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item
  • subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
  • align - the way of alligning


19. Setting up the subitem icon

send_command dvTP, "'IRLB_ITEM_ICON_ALIGN-<address,id,subitem,name>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item
  • subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
  • name - the name of the image added in the project gallery


20. Setting up alligning of the subitem icon

send_command dvTP, "'IRLB_ITEM_ICON_ALIGN-<address,id,subitem,align>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item
  • subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
  • align - the way of alligning


21. Setting up the subitem border by the identifier

send_command dvTP, "'IRLB_ITEM_BORDER-<address,id,subitem,border>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item
  • subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
  • border - the border type

22. Setting up the color of the subitem border

send_command dvTP, "'IRLB_ITEM_BORDER_COLOR-<address,id,subitem,color>'"
  • address - the item address (the list basis - Multistate-Bargraph)
  • id - the identifier of the list item
  • subitem - the identifier of the list subitem (starts from zero, 0 - the basis and etc.)
  • color - the color (HEX, RGB, the color name)