XML menu file description
- menu and submenu structure :
Code:
<menu title='Configuration'>
<submenu name='SMS' label='SMS'>
...
</submenu>
<submenu name='Clock' label='Clock'>
...
</submenu>
...
</menu>
---------------------------------------------------------------------------------------------------------
<menu> menu
It's the main menu
attributes
title : menu title
background : background picture
backcolor : background color
rgb : default menu text color
quitlabel : label of left softkey
forcequit : still in memory for fast ('no' per default), clean close ('yes')
Code:
<menu title='My title'>
...OR...
<menu quitlabel='Back' title="Tasks" backcolor='0,128,0' rgb='192,192,192' >
... OR...
<menu quitlabel='Back' title="Tasks" background='%APPDIR%\Examples\Bg.png' >
---------------------------------------------------------------------------------------------------------
<submenu> menu
To describe a submenu
attributes
name : unique identifier of submenu
label : submenu title
comment : submenu subtitle
interline : show ('yes' per default) or hide ('no') items interline
icon : path of .png/.jpg picture
Code:
<submenu name='SMS' label='SMS'>
...
</submenu>
---------------------------------------------------------------------------------------------------------
<text> item
Show a text
attributes
label : text content
rgb : color of text (r,g,b)
align : text alignment ('center' by default, 'left')
style : 'italic' for italic font, 'small' for smaller font
left : left coordinates (15 pixels per default)
comment : comment show in 2nd line
commentrgb : color of comment (r,g,b)
commentalign : comment alignment ('center' by default, 'left')
commentstyle : 'italic' for italic font, 'small' for smaller font
run : action to execute when clic on text
icon : path of .png/.jpg picture
fontname : font of text (Tahoma per default)
fontsize : size of text (9 per default)
commentfontname : font of comment (fontname per default)
commentfontsize : size of comment (fontsize per default)
Code:
<text rgb='128,0,0' label='text example' left='100'/>
[color=red] <text quit='no' commentfontsize='10' commentrgb='0,0,128' commentfontname='courier new' comment='comment-courier new 10pt' fontsize='16' label='Text-tahoma 16pt' rgb='128,0,0' />
[/color]
---------------------------------------------------------------------------------------------------------
<button> item
Show a button
attributes
label : button label
run : action to execute when clic on text
Code:
<button label='button example' run='program.exe'/>
---------------------------------------------------------------------------------------------------------
<separator> item
Déclare a items separator
attributes
label : text of separator
interline : show ('yes' per default) or hide ('no') items interline
Code:
<submenu name='Weather' label='Weather'>
...
<separator label='MSN' />
...
<separator label='AccuWeather' />
..
<separator label='Google' />
</submenu>
---------------------------------------------------------------------------------------------------------
<files> item
Create a list of files
attributes
filter : files mask to scan (you can use '*' in the filter))
show : display substring of file name '[start,len]' -> full file name per default
run : action to execute when clic on one item
%FILE% macro in run attribute : use the full file name
%SHOW% macro in run attribute : use the substring file name defined with show attribute
Code:
<menu title='Skins'>
[b]<files[/b] filter='%JMLTODAY%\skins\*.*' run='%JMLTODAY%\JMLTools.exe;-skinfile:%FILE%' />
</menu>
Code:
<menu title='Language'>
[b]<files[/b] filter='%JMLTODAY%\lang\JMLLang_*.ini' show='[8,2]' run='%JMLTODAY%\JMLWinToday.exe;-lang:%SHOW%' />
</menu>
---------------------------------------------------------------------------------------------------------
<checkbox> item
Create a 2 states checkbox
attributes
label : text of item
registry : registry key to test according with value0 and value1 attributes
format : registry key format ('STRING' per default, 'DWORD' for integer)
value0 : value which defines unchecked box
value1: value which defines checked box
run : action to execute when clic on text
Code:
[b]<checkbox[/b] label='Show 0-24 hours' registry='HKLM\\Software\\Microsoft\\CHome\\JMLToday\\Param\\time' value1='HH:mm' value0='hh:mm' />
[b]<checkbox[/b] label='Show AM/PM' registry='HKLM\\Software\\Microsoft\\CHome\\JMLToday\\Param\\hour' value1='12' value0='24' />
---------------------------------------------------------------------------------------------------------
<switch> item
Create a 2 states switch -> same as <checbox>
---------------------------------------------------------------------------------------------------------
<edit> item
show an edit control
attributes
label : initial content
title : left label
width : width of edit field (50% per default if title present)
id : unique identifier (you can use this in a run attribute of <button> control for example)
Code:
[b]<edit[/b] id='[color=blue]%MYOFFSET%[/color]' label='reg:HKLM\\Software\\Microsoft\\CHome\\JMLPanex\\offset' />
<button label='Save' run='%JMLPANEX%\JMLPanex.exe;-offset:[color=blue]%MYOFFSET%[/color]' />
---------------------------------------------------------------------------------------------------------
<registrykeylist> item
list items contained in a registry key (ex. 'Page1;Page2;Page3' contains 3 items)
attributes
registry : registry key that contains items
separator : items separator character ('
;' per default)
run : action to execute when clic on one item
%VALUE% macro in run attribute : use the item value
Code:
<text center='yes' style='italic' rgb='0,128,0' label='choose a plugin to clear his cache' />
[b]<registrykeylist[/b] registry='HKLM\\Software\\Microsoft\\CHome\\Plugins' run='%JMLPANEX%\JMLPanex.exe;-clearcache:%VALUE%' />
---------------------------------------------------------------------------------------------------------
<explorer> item
Create a file explorer button item
attributes
startdir : start folder to scan
filter : files mask to scan (you can use '*' in the filter, ,
to pick a folder, use '.')
updateid : id of item to update with selected file
Code:
<edit id='%EDIT%' />
<explorer label='choose a file' startdir='%APPDIR%' updateid='%EDIT%' />
---------------------------------------------------------------------------------------------------------
<picture> item
Create a picture item
attributes
icon : picture to show
Code:
<picture icon='%APPDIR%\map.jpg' left='0' top='0' width='100%' />
---------------------------------------------------------------------------------------------------------
<icons> item
Create a item with up to 3 icons
attributes
iconleft : picture to show
runleft : action to execute
iconcenter : picture to show
runcenter : action to execute
iconright : picture to show
runright : action to execute
Code:
<icons left='30' iconleft='%APPDIR%\contact.png' runleft='%APPDIR%\IconLeft.xmu' iconcenter='%APPDIR%\contact.png' runcenter='%APPDIR%\IconCenter.xmu' iconright='%APPDIR%\contact.png' runright='%APPDIR%\IconRight.xmu'/>
---------------------------------------------------------------------------------------------------------
<space> item
Add spaces beetween 2 items
attributes
height : height of space
---------------------------------------------------------------------------------------------------------
<selector> item
Add a selector item
attributes
updateid : id of item to update with selected file
values : list of values using a separator character
select : value to select per default
separator : character separator in values (';' per default)
showvalues : display different texts in the choices dropdown instead of real values
run : action to execute
Code:
<edit id='%EDIT%' />
<selector label='choose a value' updateid='%EDIT%' values='choix1;choix2;choix3' select='choix3'/>
[color=red]<selector run='ini:%SCRIPTPATH%\MyIni.ini[MySection]MySelector:%VALUE%' label='choose a value' updateid='%COMBO2%' values='0;1;2' showvalues='value0;value1;value2' /> [/color]
---------------------------------------------------------------------------------------------------------
<datafile> item
List of contains of text file
attributes
file : text file name
separator : character separator in value
show : display substring of text '[start,len]' or part of text if separator exist (use %0...%n to select substring)
run : action to execute when clic on one item
%VALUE% macro in run attribute : use the full text line
%SHOW% macro in run attribute : use a substring
defined with show attribute
%0...%n macro in run attribute : use part of text line if separator exist
Code:
<datafile file='%APPDIR%\CitiesMSN.txt' separator=',' show='%1' run='%JMLTODAY%\JMLMeteo.exe;-setcity:%0 -msn -map:%2' />
---------------------------------------------------------------------------------------------------------
<inilist> item
list items contained in a key in section of ini-file
example of ini-file : MyIni.ini
Code:
[MySection]
MyList=val1;val2;val3
MyChoose=...
attributes
ini: key that contains items
separator : items separator character (';' per default)
run : action to execute when clic on one item
%VALUE% macro in run attribute : use the item value
Code:
<inilist updateid='%KEYLIST%' ini='%SCRIPTPATH%\MyIni.ini[MySection]MyList' run='ini:%SCRIPTPATH%\MyIni.ini[MySection]MyChoose:%VALUE%' quit='no' />
<text comment='selected value' id='%KEYLIST%' align='left' left='30' label='ini:%SCRIPTPATH%\MyIni.ini[MySection]MyChoose' />