1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="data/default.css">
<title>anyRemote - control PC with Bluetooth cell phone</title>
<link rel="stylesheet" type="text/css" href="data/default.css">
<link rel="icon" href="data/anyRemote32.png" type="image/png">
<link rel="shortcut icon" href="data/anyRemote16.png" type="image/png" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="anyRemote project page - Bluetooth remote control tool">
</head>
<body><div id="body">
<h1>Set(list ... ) and Set(iconlist ... ) commands</h1>
<p>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.
The <i>iconlist</i> can contain icons in front of each list item.
</p>
<h3>Format</h3>
<p><b>Set(list,add|replace|clear|show|close, title, _list_or_menu_data_)</b> or:
</p>
<p><b>Set(list,fg|bg|font|select, _data_)</b>
</p>
<p><b>Set(iconlist,add|replace|clear|show|close, title, _list_or_menu_data_)</b> or:
</p>
<p><b>Set(iconlist,fg|bg|font|select, _data_)</b>
</p>
<h3>Usage</h3>
<p>Command Set(list,add|replace ...) used to add or replace content of the existing list.
</p>
<ul type="disc"><pre class="screen">
<span><strong class="command">1=Set(list,replace,Commands,uptime,whoami)</strong></span>
<span><strong class="command">2=Set(list,add,SAME,reboot,poweroff)</strong></span>
<span><strong class="command">3=ExecAndSet(list,add,SAME,cat /tmp/some_file.txt)</strong></span>
</pre></ul>
<p>The word <b>SAME</b> was used instead of title if there are no needs to change existing list title.
</p>
<p>If Set(iconlist, ...) command is used, then each list item should be in form "icon_name:list_item_text":
</p>
<ul type="disc"><pre class="screen">
<span><strong class="command">1=Set(list,replace,Commands,question:uptime,ok:whoami)</strong></span>
</pre></ul>
<p>Command Set(list,show|clean) used to show or clean existing list.
<ul type="disc"><pre class="screen">
<span><strong class="command">3=Set(list,show)</strong></span>
<span><strong class="command">4=Set(list,clean)</strong></span>
</pre></ul>
<p>Command Set(list,close) used to close existing list. If list is closed, then main window of Java Client will be shown.
<ul type="disc"><pre class="screen">
<span><strong class="command">Back($$)=Set(list,close)</strong></span>
</pre></ul>
<center>
<table style="text-align: left; width: 80%;" border="0" cellpadding="10" cellspacing="1">
<tbody>
<tr>
<td style="vertical-align: top; text-align: center; width=50%;"><img src="data/client-list.png" align="center" border="1"></td>
<td style="vertical-align: top; text-align: center; width=50%;"><img src="data/client-list-menu.png" align="center" border="1"></td>
</tr>
</tbody>
</table>
</center>
<p>It is possible to add custom made menu by <a href="set-menu.html">Set(menu ...)</a> 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.
<p>There are several things which needs to be pointed out:
<ul type="disc">
<pre>
<li>All '\r' characters in results of execution of command ExecAndSet(list|iconlist,add|replace,_title_, ...) command will be replaced
with comma (',') on java client's side. So, it is possible to show commas (',') inside list items.
<li>List items numbering starts with 1
<li>If server does not issue Set(list,menu ...) command there will be automatically created default menu, which contains item "Back"
<li>In any menu created with Set(list,menu ...) there anyway will be automatically created menu item "Back"
<li>The first item in menu created with Set(list,menu ...) will be used to issue the command then user selects list item (in another words
- push joystick without descending to menu and choosing menu item). In default menu "Select" item will be used to issue the command
then used selects list item.
</pre>
</ul>
<p>To handle events on server side it needs to use lines like:
<ul type="disc"><pre class="screen">
<span><strong class="command">MenuItemX($$)=Some_command</strong></span>
</pre></ul>
<p>The list element value and the list element index will be substituted with the $(Param) and $(Index) variables:
<ul type="disc"><pre class="screen">
<span><strong class="command">Choose($$)=Exec(xmmsctrl track $(Index))</strong></span>
<span><strong class="command">Choose($$)=Exec(kdialog --msgbox "Current track is $(Param)")</strong></span>
</pre></ul>
<p>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 <b>equivalent</b> and each of them will match
that event.
<ul type="disc"><pre class="screen">
<span><strong class="command">Choose(1)=Exec(kdialog --msgbox "User choose REBOOT (match by index)")</strong></span>
<span><strong class="command">Choose(Reboot)=Exec(kdialog --msgbox "User choose REBOOT (match by value)")</strong></span>
</pre></ul>
<p>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:
<ul type="disc"><pre class="screen">
<span><strong class="command">Back($$)=Set(list,close)</strong></span>
</pre></ul>
<p>Command Set(list,select,_index_) used to select in list item with specified index. Items numbering starts from 1.
<ul type="disc"><pre class="screen">
<span><strong class="command">5=Set(list,select,1)</strong></span>
</pre></ul>
<p>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.
<ul type="disc"><pre class="screen">
<span><strong class="command">5=Set(list,fg,255,255,255)</strong></span>
</pre></ul>
<p>Command Set(list,font [,small | medium | large] [,bold] [,italic] [,underlined] [,system | monospace | proportional])
used to set font parameters. Java realization in the phone could support only some subset of fonts which can be specified by this command. <ul type="disc"><pre class="screen">
<span><strong class="command">6=Set(list,font,medium,bold,proportinal)</strong></span>
</pre></ul>
<h3>Autoscrolling of long lines</h3>
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.
<h3>Using special keys</h3>
<center>
<table style="text-align: left; width: 700px;" border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="vertical-align: top; text-align: center; width=20%;"></td>
<td style="vertical-align: top; text-align: center; width=20%;">1</td>
<td style="vertical-align: top; text-align: center; width=20%;">3</td>
<td style="vertical-align: top; text-align: center; width=20%;">7</td>
<td style="vertical-align: top; text-align: center; width=20%;">9</td>
</tr>
<tr>
<td style="vertical-align: top; text-align: center; width=20%;">Move to</td>
<td style="vertical-align: top; text-align: center; width=20%;">first item</td>
<td style="vertical-align: top; text-align: center; width=20%;">one page up</td>
<td style="vertical-align: top; text-align: center; width=20%;">last item</td>
<td style="vertical-align: top; text-align: center; width=20%;">one page down</td>
</tr>
</tbody>
</table>
</center>
<br>
</div>
<div id="sidebar">
<p class="section">Information</p>
<ul>
<li><a href="index.html">About</a></li>
<li><a href="dload.html">Download</a></li>
<li><a href="pre.html">Prerequisites</a></li>
<li><a href="docs.html">Documentation</a></li>
<li><a href="frontend.html">FrontEnds</a></li>
</ul>
<p class="section">Documentation</p>
<ul>
<li><a href="pre-setup.html">Before install</a></li>
<li><a href="install.html">Compilation and installation</a></li>
<li><a href="mode.html">Which mode to choose ?</a></li>
<li><a href="use.html">How to use anyRemote</a></li>
<li><a href="setup-server.html">Setup: Server mode</a></li>
<li><a href="setup-at.html">Setup: AT mode</a></li>
<li><a href="conf-server.html">Configurational file format: Server Mode</a></li>
<li><a href="conf-at.html">Configurational file format: AT Mode</a></li>
<li><a href="dcop.html">DCOP support</a></li>
<li><a href="web.html">Web interface</a></li>
<li><a href="faq.html">FAQ</a></li>
</ul>
<p class="section">Server mode</p>
<ul>
<li><a href="setup-server.html">Setup: server mode</a></li>
<li><a href="conf-server.html">Configurational file format: server mode</a></li>
<li><a href="conf-server-ex.html">Configurational file examples: server mode</a></li>
</ul>
<p class="section">Set() command</p>
<ul>
<li><a href="set.html">Common usage of Set()</a></li>
<li><a href="set-icons.html">Set(icons, ...)</a></li>
<li><a href="set-fm.html">Set(filemanager, ...)</a></li>
<li><a href="set-list.html">Set(list, ...)</a></li>
<li><a href="set-menu.html">Set(menu, ...)</a></li>
<li><a href="set-parameter.html">Set(parameter, ...)</a></li>
<li><a href="set-text.html">Set(text, ...)</a></li>
<li><a href="set-window.html">Set(image, ...)</a></li>
</ul>
</div>
<div id="hdr">
<div id="logo"><a href="index.html"><img src="data/anyRemote.png" alt="Home"></a></div>
<!--div id="banner"><img src="data/anyRemote.png" alt=""></div-->
<p class="none"></p>
<div id="hdrNav">
<a href="index.html">About</a> ·
<a href="dload.html">Download</a> ·
<a href="docs.html">Documentation</a> ·
<a href="frontend.html">FrontEnds</a> ·
<a href="contacts.html">Contacts</a> ·
</div>
</div>
<div id="copyright">
Maintained by <a href="mailto:anyremote@mail.ru">anyRemote</a><br>
</div>
</body></html>
|