This command used to create and manage lists which will be shown on the phone screen. This could be useful to manage player playlists or to browse directory structure.
Format: Set(list,add|replace|clear|show|close, title, _list_or_menu_data_)
or: Set(list,fg|bg|font|select, _data_)
Command Set(list,add|replace ...) used to add or replace content of the existing list.
1=Set(list,replace,Commands,uptime,whoami) 2=Set(list,add,SAME,reboot,poweroff) 3=ExecAndSet(list,add,SAME,cat /tmp/some_file.txt) 4=Timer(t1,5,0,list,add,SAME,cat /tmp/some_file.txt)The word SAME was used instead of title if there are no needs to change existing list title.
Command Set(list,show|clean) used to show or clean existing list.
3=Set(list,show) 4=Set(list,clean)
Command Set(list,close) used to close existing list. If list is closed, then main window of Java Client will be shown.
Back($$)=Set(list,close)
![]() |
![]() |
It is possible to add custom made menu by Set(menu ...) command. If user chooses ListItemX in list and then chooses MenuItemY in menu then command MenuItemY(index_of_ListItemX_in_list,ListItemX) will be issued. According to the screenshot above the Choose(9,ChangeLog) command will be issued.
There are several things which needs to be pointed out:
To handle events on server side it needs to use lines like:
MenuItemX($$)=Some_command
The list element value and the list element index will be substituted with the $(Param) and $(Index) variables:
Choose($$)=Exec(xmmsctrl track $(Index)) Choose($$)=Exec(kdialog --msgbox "Current track is $(Param)")
It is possible to overcome substitution of the $(Param) and $(Index) variables with explicit specification of event. For example if Choose(1,Reboot) event is send from Java Client, then two next lines will be equivalent and each of them will match that event.
Choose(1)=Exec(kdialog --msgbox "User choose REBOOT (match by index)") Choose(Reboot)=Exec(kdialog --msgbox "User choose REBOOT (match by value)")
As it was written above, "Back" menu item is added automatically, but it is user responsibility to handle corresponding events on server side. In general it could be done like this:
Back($$)=Set(list,close)
Command Set(list,fg|bg,R,G,B) used to set foregroung or background colors, where values of R,G and B should be beetween 0 and 255.
5=Set(list,fg,255,255,255)
Command Set(list,select,_index_) used to select in list item with specified index. Items numbering starts from 1.
5=Set(list,select,1)
Command Set(list,font,small|meduim|large) used to set font size.
6=Set(list,font,medium)
Autoscrolling of long lines.
If a list item is too long to be shown in full, it will be autoscrolled when it will be under cursor. It it possible to switch on/off
autoscrolling by pressing "0" key at phone's keypad.