GUI XML Screens

Last update: 2006-02-15

This information is for v2.3.2+.

Older information for v2.3.0 and v2.3.1 here.


Overview

This document is something for theme creators, advanced users and developers.
The document has these sections:
- Screen
- Example Screens
- $TAG aka GUI TAG
- $TAG properties
- $TEXT / $LIST tags
- Commands (cmdNAME)

Abbreviation

Definition

themeimage

$TAGs of type $BUTTON, $IMAGE, $CHILDIMAGE, $BACKGROUND

themetext

$TAGs of type $LIST, $TEXT

$TAG

$TAG aka GUI TAG





x : Available
(x) : Will be available, but this is not done yet. Could be that something is missing from the code.
(x?) : Not available, but could be. For some reason (e.g. lazy coder) functionality is missing in MokCC.
strikethrough : Not available and most probaply will not ever be.
italic: Unfinished text, a note, something the writer just left there.

Screen

Each screen is defined in a file. Each file has three parts: DEFAULT, ELEMENTS and SCREEN. From these only the screen section is mandatory. Each section starts with <SECTION NAME> and ends in </SECTION NAME> (notice the slash '/').

You can build everything in to one file if you prefer. Just remember to have unique names for the screens.

Section

Description

SCREEN

This section defines the elements to print and their coordinates. The elements are printed in the order defined. X and Y define the coordinate on screen and ID is the element name.

This part is mandatory. This can be named as anything: <ANYTHING>.

<ANYTHING>
X="100",Y="100",ID="ARTISTNAME"
</ANYTHING>

On the coordinates 100,100 the information in element ARTISTNAME is printed.

DEFAULT

This section defines the default settings to use. Each element has a set of settings which can be used. If nothing is specified, the settings in DEFAULT are used. If DEFAULT is not defined, predefined (<------- Link to predef values------) values will be used.

This must be named as <DEFAULT>.

<DEFAULT>
WIDTH="20",ATTR="NORMAL",FONT="8",ALIGN="LEFT"
</DEFAULT>

Everything will be printed on a 20 (chars) wide screen, aligned to the left in small font with attribute normal (e.g. no blinking).

ELEMENT

This section defines the element and it's properties. The properties defined here will override settings in <DEFAULT> for this element.

This can be named as anything: <ANYTHING>.

<ELEMENT ID="ARTIST">
VALUE="$ARTIST",FONT="16",ALIGN="CENTER"
</ELEMENT>

This will create an element with name ARTIST. It will print the artist name centered in a 16x16 font. Note that rest of the properties (e.g. ATTR) is taken from <DEFAULT>.



Screen definitions

Description

X
Y

The coordinates on the screen where the element is to be drawn. The coordinate can be a strict value or a relative value beginning with +/- signs.

X="100"
X="+10"
Y="-10"

ID

The identification of the element. The rest of the information is read from the element definition.

<ELEMENT ID="ARTISTNAME">
VALUE="$ARTIST"
</ELEMENT>

ID in this element is ARTISTNAME.



Example screens

LCD screen

XML file contents

<DEFAULT>
WIDTH="20",ATTR="NORMAL",FONT="8",ALIGN="LEFT"
</DEFAULT>
<ELEMENT ID="LINE">
VALUE=”$TEXT”,CAPTION="--------------------"
</ELEMENT>
<ELEMENT ID="SLASH">
VALUE=”$TEXT”,CAPTION="/"
</ELEMENT>
<ELEMENT ID="LISTPOS">
VALUE=”$LISTPOS”
</ELEMENT>
<ELEMENT ID="LISTLEN">
VALUE=”$LISTLEN”
</ELEMENT>
<ELEMENT ID="ARTIST">
VALUE="$ARTIST",FONT="16",ALIGN="CENTER"
</ELEMENT>
<ELEMENT ID="LIST">
VALUE="$LIST",LISTHEIGHT="9",LISTHIGHLIGHT="BIG",LISTMODE="$ARTIST-$ALBUM" ***TBD - CHECK THIS***
</ELEMENT>
<ELEMENT ID="CLOCK">
VALUE="$CLOCK",FONT="16",WIDTH="9"
</ELEMENT>

<MP3_SELECT>
X="00",Y="00",ID="ARTIST"
X="00",Y="02",ID="LINE"
X="00",Y="03",ID="LIST"
X="00",Y="13",ID="LINE"
X="00",Y="13",ID="LISTPOS"
X="03",Y="13",ID="SLASH"
X="04",Y="13",ID="LISTLEN"
X="11",Y="14",ID="CLOCK"
</MP3_SELECT>



$TAG aka GUI tags

$TAGs are set in to VALUE property in element.

Basic properties

LCD

TV

Description

VALUE

x

x

(string) The $TAG for the element. This is the main property that all $TAGs must have. Depending on the use, you should choose a proper value for it.

Possible values for images (themeimage):
$BACKGROUND : The background image of the current theme.
$BUTTON : A button on screen.
$CHILDIMAGE : Draws an image to the screen depending on the active button.
$IMAGE: Draws an image to the screen.

Possible values for images (themetext):
$LIST : Draws a list on screen.
$TEXT : Draws text on screen.

VALUE="$TEXT"
VALUE="$BUTTON"


Each $TAG has a set of properties that can be used to define how it looks or behaves on screen. Below is a table that (hopefully) clarifies the dependencies.

Property / $TAG

$BACKGROUND

$BUTTON

$CHILDIMAGE

$IMAGE

$LIST

$TEXT

ACTION

-

x

-

-

x

-

ALIGN

-

x

?

?

?

x

ALIGNVERTICAL

top

x

top

top

top

x

ATTR

-

-

-

-

only LCD

only LCD

BUTTONACTIVE

-

x

-

-

-

-

BUTTONDISABLED

-

x

-

-

-

-

BUTTONDOWN

-

x

-

-

-

-

BUTTONUP

-

x

-

-

-

-

CAPTION

-

x

-

-

-

x

CAPTIONOFFSETX

-

x

-

?

-

-

CAPTIONOFFSETY

-

x

-

?

-

-

CHILDIMAGE

-

x

-

x

-

-

FILENAME

x

x

x

x

-

-

FONTBOLD

-

x

-

-

x

x

FONTCOLOR

-

x

-

-

x

x

FONTCOLORACTIVE

-

x

-

-

?

x

FONTNAME

-

x

-

-

x

x

FONTSIZE

-

x

-

-

x

x

HEIGHT

x

x

x

x

x

x

LISTHIGHLIGHT

-

-

-

-

x

-

LISTMODE

-

-

-

-

x

-

MASK

-

x

x

x

-

-

MASKCOLOR

-

x

x

x

-

-

NAUGHTYBIT

?

x

x

x

-

-

TABDOWN

-

x

-

-

-

-

TABINDEX

-

x

-

-

-

-

TABLEFT

-

x

-

-

-

-

TABRIGHT

-

x

-

-

-

-

TABUP

-

x

-

-

-

-

TOOLTIP


x





VALUE

x

x

x

x

x

x

WIDTH

x

x

x

x

x

x

WRAP






x



$TAG properties

In addition to basic properties, certain $TAGs ($BACKGROUND, $IMAGE and $BUTTON) have extra values. Notice that some of the properties are only supported in TV mode, some in LCD mode.

Abbreviations
x : Supported.
- : Not supported.

Basic properties

LCD

TV

Description

CAPTION

x

x

Text to be printed. Can also include one (or more) $TEXT/$LIST tag with or without additional text.

CAPTION=”Foo text”
CAPTION=”$ARTIST”
CAPTION=”Now playing: $SONG”

CAPTION=”Now playing: $SONG from $ARTIST”

FONTSIZE

x

x

(integer) Size of the font.

LCD
For LCD only two sizes are supported: 8=8x8 font and 16=16x16 font

FONTSIZE=”8”

FONTNAME

-

x

Name of the font.

FONTNAME=”ARIAL”

FONTBOLD

-

x

(boolean) Defines if text printed will be in bold style. This works both for $TEXT and $LIST

FONTBOLD="Y"
FONTBOLD="N"

FONTCOLOR

-

x

(integer) The color of the font. Color is defined in RGB and can be either decimal or hex.

FONTCOLOR=”123456”
FONTCOLOR=”$89abcd”

WIDTH

x

x

(integer) Width of the area where to print.

- Themeimage is resized to WIDTH. If HEIGHT is not defined, themeimage will be resized, but will keep it's proportions.
- Themetext is cropped if longer than WIDTH.

LCD
- $TEXT: Width of the area (in characters) where to print. 0: No cutting or scrolling will be done. Text will be printed as is (e.g. continues from next row).
- $IMAGE: Size of image in characters.

WIDTH=”12”

HEIGHT

x

x

(integer) Height of the area where to print.

- Themeimage is resized to HEIGHT. If WIDTH is not defind, themeimage will be resized, but will keep it's proportions.
- Themetext is cropped. (?)

LCD
- $TEXT: Nothing
- $LIST: Height of list. As the hightlight is in the middle of the list, I suggest to use ODD values here (3, 5, ...). Note that this height is not on screen height but the amount of lines to show. Due to this, using listhighlight="BIG", will result in a list which is listheight+1 on screen.
- $IMAGE: Size of image in characters.

HEIGHT=”4”

ATTR

x

-

(attrtype) The attribute to use when printing characters to screen.

LCD
- NORMAL: Normal characters. The attribute area under the text is cleared.
- REVERSE: Reversed characters.
- BLINK: Blinking characters.
- BLINKREVERSE: Reversed characters blinking.
- NOCHANGE: This prints only text without messing the attribute area.
- ONLYATTR: This prints only the attribute without messing the text area. (Coder's note: How to pass the wanted attribute???)
- FASTPRINT: Prints the text as fast as possible. Useful when coding a screensaver or such.

ATTR=”BLINK”

ALIGN

x

x

(aligntype) Horizontal alignment of $TAG.

LCD:
- LEFT: Text is aligned to the left.
- CENTER: Centers the text if it fits to width. If text is longer, text will be aligned to left.
- RIGHT: Text is aligned to the right.
- SCROLL: Scrolls the text unless it fits to width. If text fits, the text will be centered. Text scrolls in a WIDTH wide window. If WIDTH=0, no scrolling will happen.

ALIGN=”RIGHT”

ALIGNVERTICAL

-

x

(aligntype) Vertical alignment of $TAG. Allowed values are TOP, BOTTOM, CENTER.

Elem ........ T B C
--------------------
$TEXT ....... X X X
$BUTTON ..... X X X
$ARTIST ..... X X X
$ALBUM ...... X X X
$SONG ....... X X X
$LIST ....... X n n
$IMAGE ...... X n n
$CHILDIMAGE . X n n
$BACKGROUND . X n n

X = supported.
n = will not be implemented
T = TOP
B = BOTTOM
C = CENTER

ALIGNVERTICAL=”CENTER”

LISTMODE

x

x

Defines what is to be printed on the list. The value can be plain text with or without $TEXT / $LIST tags.

LISTMODE="$ARTIST"
This prints a list of 'artists'
LISTMODE="$ALBUM - $SONG”
This prints list of 'album - song'

LISTHIGHLIGHT

x

x

Defines how the line in the middle of the list is represented.

TV:
The color to use for the line that is active. The value can be either in hex ($) or decimal.

FONTCOLOR=”123456”
FONTCOLOR=”$89abcd”

LCD:
- BLINK: Text is blinking.
- REVERSE: Text is mirrored
- BLINKREVERSE: Text is mirrored and is blinking.
- TAG: Infront of the list, a tag ('>') is printed.
- BIG: Text is written in big letters. Notice that lines on the screen will be listheight+1 due to the bigger font.

(Coder's note: How to have BIG text which is REVERSE?)

LISTHIGHLIGHT=”BLINK”

LISTROWCOUNT

-

x

(integer) How many rows to show on screen.

LISTROWCOUNT=”10”
This will draw 10 lines of LISTMODE on screen. Linedistance between lines is WIDTH / LISTROWCOUNT. Note that if your font is bigger than linedistance, characters end up on top of each other.

LISTROWSELECT

-

x

(integer) Which line to use as the row for selection.

LISTROWSELECT=”5”
The 5th line is shown with LISTHIGHLIGHT color as active.

NAUGHTYBIT

-

x

(boolean) Sets the 'parental advisory' bit of an element. If the user so decides, he/she can set the naughty bits -stuff off somewhere (where?) so the screen does not display anything which has NAUGHTYBIT set. This allows screens/skins have content, that can be generally switched off when so desired.

NAUGHTYBIT="Y"
NAUGHTYBIT="N"

Extra properties for
$BACKGROUND, $IMAGE and $BUTTON

LCD

TV

Description

FILENAME

x

x

(filename) The filename where the graphics are to be loaded from. If path is not defined, the default is pics-directory under the theme (themename\pics).

FILENAME=”foo.jpg”

MASK

-

x

(boolean) Whether a mask is used when showing themeimage. The color used as the transparent color is set in MASKCOLOR. Do note that this works best with .bmp files.

MASK=”Y”

MASKCOLOR

-

x

(integer) The color used for masking. Anything in a picture with this color will be transparent. Color is defined in RGB and can be either decimal or hex.

MASKCOLOR=”1234567”
MASKCOLOR=”$89abcd”

$BUTTON (only)

LCD

TV

Description

ACTION

-

x

(string) What this element (button) should do when pressed. Values are separated with | (pipe).

ACTION=”cmdSOMETHING” or
ACTION=”cmdSOMETHING|parameters”
or
ACTION=”cmdSOMETHING|parameters|xmlpage|<SCREEN>”

Accepted actions and commands are found in
commands
.

ACTION="cmdQUIT"
MokCC will close and Windows will shutdown.
ACTION="cmdMP3Select|MP3|page.txt|<MP3SELECT>"
MokCC will start MP3Select with parameters found in [MP3] section of mok.ini.
ACTION="cmdMP3|MP3"
MokCC will start MP3 play with parameters found in [MP3] section of mok.ini. The xmlpage and screen used are the same as on the previous action done.
ACTION="cmdMP3|MP3||<SCREEN>"
MokCC will start MP3 play with parameters found in [MP3] section of mok.ini. The xmlpage and screen used are the same as on the previous action done.
ACTION="cmdPAGE||weather.txt|<WEATHERSCREEN>"
The screen <WEATHERSCREEN> found in weather.txt is shown to the user. NOTE, there are no second parameters passed with cmdPAGE

BUTTONACTIVE

-

x

(filename) $BUTTON element highlight graphics

BUTTONACTIVE=”button_a.jpg”

BUTTONUP

-

x

(filename) $BUTTON element normal graphics

BUTTONACTIVE=”button_u.jpg”

BUTTONDOWN

-

x

(filename) $BUTTON element when pressed down graphics

BUTTONACTIVE=”button_d.jpg”

BUTTONDISABLED

-

x

(filename) $BUTTON element disabled graphics

BUTTONACTIVE=”button_disa.jpg”

CAPTIONOFFSETX
CAPTIONOFFSETY

-

x

(integer) X/Y-offset where CAPTION is printed from $BUTTON elements X/Y-coordinate.

CAPTIONOFFSETX=”4”

FONTCOLORACTIVE

-

x

(integer) CAPTION is printed with this color when $BUTTON is active. Color is defined in RGB and can be either decimal or hex.

FONTCOLORACTIVE=”1234567”
FONTCOLORACTIVE=”$89abcd”

CHILDIMAGE

-

x

(element) On-screen graphics we want to change depending on the active button. The value you set is the childimage element.

CHILDIMAGE=”CHILDIMAGE3”, and you have defined a CHILDIMAGE3

<ELEMENT ID="CHILDIMAGE3">
VALUE="$CHILDIMAGE",FILENAME="yellowsubmarine.jpg"
</ELEMENT>

TOOLTIP

-

x

(string) When an element is active, a tooltip can be shown to user.

TOOLTIP=”Press this to play movies.”

TABINDEX

-

x

(integer) The number of tab in a button. This value is used in TAB___ properties.

TABINDEX=”1”

You can also let MokCC to handle all button sorting. This is done by setting the value AUTO. The buttons will be sorted according to their X/Y position defined in the <SCREEN> section. This automagic is stupid. Even if it looks (to the eye) that the buttons are aligned, the coordinates are the important ones. In order to get them aligned pixel-by-pixel, do use +/- for assignment.

<SCREEN>
X="100",Y="100",ID="B1"
X="+10",Y="+00",ID="B2"
X="+10",Y="+00",ID="B3"
X="-20",Y="+10",ID="B4"
X="+10",Y="+00",ID="B5"
X="+00",Y="+10",ID="B6"
</SCREEN>

Would result in buttons on screen like this:

X/Y--100--110--120
100-[B1]-[B2]-[B3]
110-[B4]-[B5]
120------[B6]


From B5 pressing UP would end up in B2, DOWN to B6, LEFT to B4 and RIGHT to B4 (as it will roll around).

TABINDEX=”AUTO”

TABLEFT
TABRIGHT
TABUP
TABDOWN

-

x

(integer) Used to determine which element to go to when pressing left/right/up/down.

TABLEFT=”1”
Pressing kLEFT on remote, will activate the element with TABINDEX value 1.



$TEXT / $LIST tags

The properties below can be used with both $TEXT and $LIST.

$TEXT / $LIST properties

LCD

TV

MP3

DVD

MOV

CD

Description

$ALBUM

x


x

x

x

x

The name of the current album.

Note: This should be renamed to $ITEM. That way it works both for movies and music. See also note for $ARTIST

$ARTIST

x


x

x

x

x

The artist/director information for the current item

$ASPECT

x



x

(x)


Aspect ratio for the movie (4:3, 16:9)

$BITRATE

x


x

(x?)

(x?)

(x?)

Bitrate of the current audio stream.

DVD: This could be found from the DVD information, but is this available (in Eugene).
MOV: This could be found from the DVD information, but is this available (in movie player).
CD: Samplerate is constant (256kbit/s???)

$CHAPTER

x


x

x


x

DVD: The number of the chapter played on DVD.
CD: The number of currently playing track on CD.
MP3: The number of currently played song on an MP3 album. This is NOT the total amount of songs in the list.

Note: Should be renamed to CHAPTERTRACK etc...

$CHAPTERAMOUNT

x


x

(x)


x

The total amount of chapters on DVD.
The total amount of tracks on CD.
The total amount of tracks on MP3 album. This is NOT the total amount of songs in the list.

Note: Should be renamed to CHAPTERTRACKAMOUNT etc...

$CLOCK

x


x

x

x

x

The current time in format 'hh:mm'.

Note: This could be done to support formatting as 'dd.mm' as parameters.

$CODING

x



x

(x?)


The coding used for the movie.

DVD: ????
MOV: This could be the encoding used (mpeg1, divx, ...)

$FRAMERATE

x



(x)

x


The framerate of the movie. On DVD this is constant (PAL=25, NTSC=30)

$LISTLEN

x


x

x

x

x

Length of list (1-n)

$LISTPOS

x


x

x

x

x

Current position on the list (1-n)

$REGION

x



x



The region on DVD

$RESOLUTION

x



x

x


XXX x YYY as pixels.

$SAMPLERATE

x


x

(x?)

(x?)

(x?)

Samplerate of the current audio stream

DVD: This could be found from the DVD information, but is this available (in Eugene).
MOV: This could be found from the DVD information, but is this available (in movie player).
CD: Samplerate is constant 44.1KHz

$SONG

x


x



x

The name of the current song.

$STANDARD

x



x



The television standard on DVD (PAL, NTSC)

$TIMEALBUMCURRENT

x


(x?)



x

The time played the current album.

MP3: Currently played time towards ALL MP3 music. How to do this?

$TIMEALBUMTOTAL

x


(x?)



x

The total time of the current album.

MP3: The total length of ALL MP3 music. How to do this?

$TIMECURRENT

x


x

x

x

x

Time of currently played item. Format 'mm:ss' and if time is longer than 59 minutes, the format is 'hh:mm:ss'.

$TIMELEFT

x


x

x

x

x

The time to play the currently played item. Format 'mm:ss' and if time is longer than 59 minutes, the format is 'hh:mm:ss'.

$TIMEPERCENT

x


x

x

x

x

Time played vs time total (0-100).

$TIMETOTAL

x


x

x

x

x

Total time of the currently played item. Format 'mm:ss' and if time is longer than 59 minutes, the format is 'hh:mm:ss'.



Commands (cmdNAME)

All commands are sent from module to core with SendCmd:
procedure SendCmd(cmd:TCmd; val: integer; modName:String);

sendCmd(cmdMP3SELECT,0,'MP3|xml_all.txt|<SELECTMP3>');

If developers do not want to parse for example cmd and modName, you can always use cmdUNPARSED where you let MokCC take care of all parsing.
procedure SendCmd(cmdUNPARSED; val: integer; cmd|modName:String);

sendCmd(cmdUNPARSED,0,'cmdMP3SELECT|MP3|xml_all.txt|<SELECTMP3>');

In themes the commands are sent with buttons. In them, an ACTION is defined.

ACTION=”cmdMP3SELECT|MP3|xml_all.txt|<SELECTMP3>”

Abbreviation

Definition

sectionname

Section in mok.ini (eg. [MP3]). If this is left away, the previously used page is used again.

state

<tbd>

xmlpage

The xml page file to use when running current state. Paired always with <SCREEN>. If this is left away, the previously used page is used again.

<SCREEN>

The screen section (found in the xml page file) to use when running current state. Paired always with xmlpage.



Tcmd (cmdNAME)

Description

cmdNONE

Does nothing.

cmdMP3SELECT
cmdDVDSELECT
cmdMOVIESELECT

A selection screen state is activated. This will do normal scan and create a playlist of found songs* to play.

val: <not used>
modName: sectionname|xmlpage|<SCREEN>


ACTION="cmdMP3SELECT|MP3|xml_all.txt|<SELECTMP3>"

For developers:
SendCmd(cmdMP3SELECT,0,'MP3');


*) or movies or dvds

cmdMP3
cmdDVD
cmdMOVIE
cmdCD

MokCC starts playing MP3 music, movie or CD audio disk. The first song* found from the path specified in mok.ini's sectionname.

val: -1 use the selected song* selected in cmdMP3SELECT.
val: >=0 select the song* number in list at position val.
modName: sectionname|xmlpage|<SCREEN>


ACTION="cmdMP3|MP3|xml_all.txt|<PLAYMP3>"
ACTION="cmdCD|CDA|xml_all.txt|<PLAYCDA>"


For developers:
SendCmd(cmdMP3,-1,'MP3');


*) or movie or dvd

cmdSTOP

Current action is stopped and we return to previous state.

val: <not used>
modName: <not used>


ACTION="cmdSTOP"

For developers:
SendCmd(cmdSTOP,0,'');


In an example screen setup mainmenu -> mpe selection -> mp3 play:
- cmdSTOP in MP3 selection screen, will return you to mainmenu.
- cmdSTOP in MP3 play screen, will return you to MP3 selection screen if it was used.

cmdSCREENSAVER

MokCC activates screensaver state. Any keypress will return back to the previous state. Use only from mainmenu state. The screensaver name is always module specific so be careful when assigning this. All modules should have a default screensaver (eg. empty screen) which is run during screensaver state.

Note that this has nothing to do with Windows screensavers.

val: <not used>
modName: screensaver name


ACTION="cmdSCREENSAVER"

For developers:
SendCmd(cmdSCREENSAVER,0,'ss001');

cmdSHUTDOWN

Forces a powerdown (& shutdown) for Windows. Any unsaved data will be lost.

val: <not used>
modName: <not used>


ACTION="cmdSHUTDOWN"

For developers:
SendCmd(cmdSHUTDOWN,0,'');

cmdCLOSEMOKCC

Closes MokCC nicely and returns to Windows.

val: <not used>
modName: <not used>


ACTION="cmdCLOSEMOKCC"

For developers:
SendCmd(cmdCLOSEMOKCC,0,'');

cmdERRORDONE

Sends an acknowledge that the error was read. In normal usage MokCC will show the error for 10 seconds (10*cycletime) and return to previous state. With this, the user can acknowledge the error and return from the error.

val: <not used>
modName: <not used>


ACTION="cmdERRORDONE"

For developers:
SendCmd(cmdERRORDONE,0,'');

cmdTHIRDPARTY

A third party program is started by MokCC. When the started program is stopped, MokCC will return to previous state. You can send cmdSTOP or press kSTOP to close the program and return to previous state. Note that any unsaved data will cause a popup that you can not close with Mok. All application handling is done by MokCC. State will change to gui_thirdparty.

val: <not used>
modName: path\file.exe
modName: path\file.exe parameters
modName: path\file.exe parameters|xmlpage|<SCREEN>

- path\file.exe: The path and name of program to run. You can define parameters after the filename as in normal windows environment.

ACTION="cmdTHIRDPARTY|c:\notepad.exe c:\file.txt|xml_all.txt|<NOTEPAD>"
Notepad is activated and c:\files.txt is opened. From the file xml_all.txt the screen <NOTEPAD> is opened.

For developers:
SendCmd(cmdTHIRDPARTY,0,'c:\winnt\notepad.exe c:\file.txt');

cmdKEY

Sends a keypress from module to MokCC. This is handled as a normal keypress, similar to a key sent from a remote controller. This will override key sent via external parties (eg. remote controller software Girder).

val: Tkey, see <xxx> for key definitions.
modName: The key name
, see <xxx>.

ACTION="cmdKEY|kSTOP"

For developers:
SendCmd(cmdKEY,integer(kStop),'');

cmdPAGE

Activates another page to browse. When you're creating your theme, you want to create subpages for the users to enter. In these cases cmdPAGE is to be used.

val: <not used>
modName: |page.txt|<SCREEN>


NOTE: modName really starts with a pipe. There are no parameters sent with cmdPAGE.

ACTION="page||weather.txt|<WEATHERSCREEN>"

This will activate a screen named <WEATHERSCREEN> found in the file weather.txt. The given page might have a new action to show a new page. These are pages that do not need a statechange in MokCC.

cmdUNPARSED

(not to be used with ACTION)

Sends a command and leaves parsing to MokCC. This is here to make it easier for GUI developers to send commands. You don't need to do parsing for the ACTION line - just send it.

This is only for developers.

val: <not used>
modName: action


For developers: (example of sending ACTION="cmdKEY|kSTOP")
SendCmd(cmdUNPARSED,0,'cmdKEY|kSTOP');

cmdHTTPGET

(not to be used with ACTION)

File is loaded from internet by MokCC. It is possible to send multiple cmdHTTPGET at once to load a larger amount of files. MokCC will load them 'as fast as possible' and eventually the file is ready. The only way to see if the file is ready, is to poll for the existence of the file.

All parameters are separated with | (pipe).

val: <not used>
modName: filename|fileurl
modName: filename|fileurl|sourcepage .html
modName: filename|fileurl|sourcepage .html|parentpath
- filename: (mandatory) The name where the file is saved.
- fileurl: (mandatory) The url for the file to download. If using sourcepage.html, fileurl includes the information to parse from the sourcepage.html. Value returned is chosen with wildcard '*'.
- sourcepage.html: The url of the html that contains the image. Before downloading the fileurl, sourcepage.html is parsed to find the correct fileurl-filename. This is useful if you're want to show changing data (eg. Weather).
- parentpath: The path to add to the fileurl. The file to download will be parentpath+fileurl.

All examples below results in the same download:
---
SendCmd('image.gif|http://www.google.fi/images/hp0.gif',0,'');
- An image http://www.google.fi/images/hp0.gif is loaded into image.gif

---
SendCmd('image.gif|hp0.gif||http://www.google.fi',0,'');
- An image is loaded from parentpath+fileurl (http://www.google.fi/images/ + hp0.gif) is loaded into image.gif


---
SendCmd(image.gif|<img src=images/*width|http://www.google.fi|http://www.google.fi/images/',0,'');
- First the html file from http://www.google.fi is loaded.

...<td align=right valign=bottom><img src=images/hp0.gif width=158 height=78 alt="Google"></td>...

- Then we search for (the first) occurrence in that html of '<img src=images/*width'. This will return 'hp0.gif '
- Parentpath is added to the parsed filename http://www.google.fi/images/' + 'hp0.gif' resulting in http://www.google.fi/images/hp0.gif
- An image http://www.google.fi/images/hp0.gif is loaded into image.gif

NOTE that you cannot use quotes in the fileurl definition; replace them with text <QUOT>

In order to parse "Google": 'alt=<QUOT>*<QUOT>'
...<td align=right valign=bottom><img src=images/hp0.gif width=158 height=78 alt="Google"></td>...

cmdCYCLETIME

(not to be used with ACTION)

Set MokCC cycletime. MokCC has a default (1000ms) cycletime when it calls dll's to update lists and other information. When returning to a previous state with either kSTOP or cmdSTOP, cycletime will be reset back to the default value.

val: cycletime to set in ms.
modName: <not used>


ACTION="cmdCYCLETIME|500"

For developers:
SendCmd(cmdCYCLETIME,500,'');
A new cycle time of 500ms is set. Core will call dll's in 500ms cycles.