<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>anyRemote · Control your computer with your phone</title> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta name="description" content="anyRemote project page - Bluetooth remote control tool" /> <link rel="stylesheet" href="data/master.css" type="text/css" media="all" title="Default Style" charset="utf-8" /> <script src="data/effects.js" type="text/javascript" charset="utf-8"></script> <link rel="alternate" title="Feed" href="data/feed.xml" type="application/rss+xml" /> <link rel="icon" href="data/logo-favicon.png" type="image/png" /> <link rel="shortcut icon" href="data/logo-favicon.png" type="image/png" /> </head> <body id="docs"> <a class="skip" name="top"> </a> <a class="skip" href="#content">Skip to content</a> <div id="head"> <div id="logo"> <h1><a href="index.html"><img src="data/logo-head.png" alt="logo" /> anyRemote</a></h1> </div> <div id="navigation"><div class="padding"> <a href="index.html"><span>About</span></a> <a href="frontend.html"><span>Screenshots</span></a> <a href="dload.html"><span>Download</span></a> <a href="docs.html" class="active"><span>Documentation</span></a> <a href="faq.html"><span>FAQ</span></a> <a href="contacts.html"><span>Contact</span></a> <a href="thanks.html"><span>Special Thanks</span></a> </div></div> </div> <div id="sidebar"><div class="padding"> <dl class="info"> <dt>Information</dt> <dd> <p>Please use the two sidebar boxes below to browse through the anyRemote Documentation!</p> </dd> </dl> <dl class="docs"> <dt>Documentation</dt> <dd> <ul> <li><a href="pre-setup.html">Before install</a></li> <li><a href="pre.html">Software prerequisites</a></li> <li><a href="install.html">Compilation and installation</a></li> <li><a href="mode.html">Which mode to choose ?</a></li> <li><strong>Setup</strong> <ul> <li><a href="setup-at.html">Setup: AT mode</a> <ul> <li><a href="event.html">Event reporting</a></li> <li><a href="ckpd-emulation.html">Keypad emulation events</a></li> </ul> </li> <li><a href="setup-server.html">Setup: Server mode</a></li> </ul> </li> <li><a href="use.html">How to use anyRemote</a> <ul> <li><a href="android-client.html">Android Client</a></li> <li><a href="use-jc.html">J2ME Client</a></li> <li><a href="web.html">Web Interface</a></li> <li><a href="cm-xml.html">XML Services Interface</a></li> <li><a href="cfg-howto.html">How to create simple configuration file</a></li> <li><a href="bemused.html">Bemused Support</a></li> <li><a href="iviewer.html">Command Fusion iViewer support</a></li> </ul> </li> <li><a href="devices.html">Tested devices</a></li> <li><a href="phones.html">Phone specific details</a></li> <li><a href="tips-tricks.html">Tips & tricks</a></li> <li><a href="man.html">Man page</a></li> </ul> </dd> </dl> <dl class="docs-advanced"> <dt>Advanced</dt> <dd> <ul> <li><a href="http://elpraga.bshellz.net/HOWTOstartanyRemoteatboottime.html">miniHOWTO: start anyRemote at boot time and create a multimedia computer</a> (externally maintained)</li> <li><strong>Format of configuration files</strong> <ul> <li><strong>Server mode</strong> <ul> <li><a href="conf-server.html">Configuration file format</a></li> <li><a href="conf-server-ex.html">Configuration file examples</a></li> <li><a href="set.html">Set(...) / ExecAndSet(...) commands</a></li> <li><a href="set-fm.html">Set(filemanager ... ) command</a></li> <li><a href="set-icons.html">Set(icons ...) command and available icon set</a></li> <li><a href="set-list.html">Set(list ... ) and Set(iconlist ... ) commands</a></li> <li><a href="set-menu.html">Set(menu ... ) command</a></li> <li><a href="set-parameter.html">Set(parameter, ... ) commands</a></li> <li><a href="set-text.html">Set(text ... ) command</a></li> <li><a href="set-window.html">Set(image ... ) command</a></li> </ul> </li> <li><strong>AT mode</strong> <ul> <li><a href="conf-at.html">Configurational file format</a></li> <li><a href="conf-at-ex.html">Configurational file examples</a></li> </ul> </li> <li><strong>Common</strong> <ul> <li><a href="make.html">Make(...) command</a></li> <li><a href="emulate.html">Emulate(...) command</a></li> <li><a href="dbus.html">Dbus(...) command</a></li> <li><a href="vars.html">Variable substitution</a></li> <li><a href="ev-handlers.html">Event handlers</a></li> <li><a href="icon-themes.html">Icon themes for J2ME client</a></li> </ul> </li> </ul> </li> <li><a href="ir.html">anyRemote and InfraRed</a></li> </ul> </dd> </dl> <dl class="contact"> <dt>Contact</dt> <dd> <p>We will be pleased for any questions, suggestions, patches and examples of configuration files!</p> <ul> <li>Post in the <a href="http://sourceforge.net/forum/?group_id=162923">Forum</a></li> <li>Please, send e-mails to <a href="mailto:anyremote@mail.ru">anyremote@mail.ru</a></li> </ul> </dd> </dl> <!--HOSTINGLOGO--> </div></div> <!-- sidebar --> <div id="content"><div class="padding"> <a class="skip" name="content"> </a> <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> <p>To see an example please take a look at <code>cfg-data/Server-mode/exampleList.cfg</code> file.</p> <h2>Format</h2> <p><strong>Set(list,add|replace|clear|show|close,caption,title, _list_data_)</strong> or</p> <p><strong>Set(list,caption|fg|bg|font|select|icon, _data_)</strong></p> <p><strong>Set(iconlist,add|replace|clear|show|close,caption,title, _list_data_)</strong> or</p> <p><strong>Set(iconlist,caption|fg|bg|font|select, _data_)</strong></p> <img alt="Simple list" src="data/jc/fileManager.png" /> <img alt="List with icons" src="data/jc/fileManager3.png" /> <h2>Usage</h2> <h3>Set(list,add|replace ...)</h3> <p>Command Set(list,add|replace ...) used to add or replace content of the existing list. Updated list will be shown on screen.</p> <pre>1=Set(list,replace,Commands,uptime,whoami) 2=Set(list,add,SAME,reboot,poweroff) 3=ExecAndSet(list,add,SAME,cat /tmp/some_file.txt)</pre> <p>The word <strong>SAME</strong> can be used instead of title if there are no needs to change existing list title.</p> <p>If <strong>Set(iconlist, ...)</strong> command is used, then each list item should be in form "icon_name:list_item_text":</p> <pre>1=Set(list,replace,Commands,question:uptime,ok:whoami)</pre> <h3>Set(list,show)</h3> <p>Command <strong>Set(list,show)</strong> used to show existing list.</p> <pre>2=Set(list,show)</pre> <h3>Set(list,clear)</h3> <p>Command <strong>Set(list,clear)</strong> used to clear existing list.</p> <pre>3=Set(list,clear)</pre> <h3>Set(list,close)</h3> <p>Command <strong>Set(list,close)</strong> used to close existing list. If list is closed, then control (main) screen of the client will be shown.</p> <pre>Back($$)=Set(list,close)</pre> <h3>Set(list,select ...)</h3> <p>Note: Supported in <a href="use-jc.html">J2ME client</a> only</p> <p>Command <strong>Set(list,select,_index_)</strong> used to select in list item with specified index. Items numbering starts from 1.</p> <pre>4=Set(list,select,1)</pre> <h3>Set(list,caption ...)</h3> <p>Command <strong>Set(list,caption,new_caption)</strong> sets the caption of the list.</p> <pre>5=Set(list,caption,Playlist)</pre> <h3>Set(list,icon ...)</h3> <p>Command <strong>Set(list,icon,icon_name|none)</strong> used to set or reset default list icon.</p> <pre>6=Set(list,icon,ok) 7=Set(list,icon,none)</pre> <h3>Set(list,fg|bg ...)</h3> <p>Command <strong>Set(list,fg|bg,#XXXXXX|R,G,B)</strong> used to set foregroung or background colors, where:</p> <ul> <li>#XXXXXX is hexadecimal representation of the color</li> <li>R, G, B are decimal integer values beetween 0 and 255</li> </ul> <pre>8=Set(list,fg,255,255,255) 9=Set(list,fg,#FFFFFF)</pre> <h3>Set(list,font ...)</h3> <p>Command <strong>Set(list,font [,small | medium | large] [,bold] [,italic] [,underlined] [,system | monospace | proportional])</strong> used to set font parameters. Java realization in the phone could support only some subset of fonts which can be specified by this command.</p> <pre>0=Set(list,font,medium,bold,proportinal)</pre> <h3>Adding menu items</h3> <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 reply MenuItemY(index_of_ListItemX_in_list,ListItemX) will be issued. According to the screenshot above the <strong>GoTo(1,..)</strong> command will be issued.</p> <h2>Additional</h2> <p>There are several things which needs to be pointed out:</p> <p>Commands <strong>Set(list,add|replace|select|show,...)</strong> will switch current screen if needed to show list content. Overwise commands <strong>Set(list,fg|bg|font|icon|clear,...)</strong> will not switch the current screen.</p> <p>List items numbering starts with 1.</p> <p>All '\r' characters in results of execution of command <strong>ExecAndSet(list|iconlist,add|replace,_title_, ...)</strong> command will be replaced with comma ('<strong>,</strong>') on the client's side. So, it is possible to show commas (<strong>,</strong>) inside list items.</p> <p>By default list menu contains item <strong>Back</strong> only.</p> <p>Also, in any menu created with <strong>Set(menu ...)</strong> item <strong>Back</strong> will be added automatically.</p> <p>If user pushes center joystick button then message <strong>Push(...)</strong> will be generated.</p> <p></p> <p>To handle events on server side it needs to use lines like:</p> <pre>MenuItemX($$)=Some_command</pre> <p>The list element value and the list element index will be substituted with the <strong>$(Param)</strong> and <strong>$(Index)</strong> variables:</p> <pre>Choose($$)=Exec(xmmsctrl track $(Index)) Choose($$)=Exec(kdialog --msgbox "Current track is $(Param)")</pre> <p>It is possible to overcome substitution of the <strong>$(Param)</strong> and <strong>$(Index)</strong> variables with explicit specification of event. For example if <strong>Choose(1,Reboot)</strong> event is send from the client, then two next lines will be <strong>equivalent</strong> and each of them will match that event.</p> <pre>Choose(1)=Exec(kdialog --msgbox \ "User choose REBOOT (match by index)") Choose(Reboot)=Exec(kdialog --msgbox \ "User choose REBOOT (match by value)")</pre> <p>As it was written above, <strong>"Back"</strong> 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:</p> <pre>Back($$)=Set(list,close)</pre> <h2>Autoscrolling of long lines</h2> <p>Note: Supported in <a href="use-jc.html">J2ME client</a> only</p> <p>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 <strong>"0"</strong> key at the phone's keypad.</p> <h2>Using special keys</h2> <p>Note: Supported in <a href="use-jc.html">J2ME client</a> only</p> <table rules="all" class="keypad"> <tr><th colspan="3">Keypad</th></tr> <tr><td>1<br />Move to first item</td><td>2</td><td>3<br />Page Up</td></tr> <tr><td>4</td><td>5</td><td>6</td></tr> <tr><td>7<br />Move to last item</td><td>8</td><td>9<br />Page Down</td></tr> <tr><td>*</td><td>0<br />Toggle autoscrolling</td><td>#<br /></td></tr> </table> </div></div> <!-- content --> <div id="foot"> <p>Maintained by <a href="mailto:anyremote@mail.ru">anyRemote</a>. Website by <a href="http://www.martinlettner.info">m.lettner</a>.</p> </div> </body> </html>