Clues Inc.

 

 

Touch Operational Monitor Application Tool for Easily

 

Scripting Reference

 

Version 1.20


 


TOMATE Scripting Reference

Explanation of icons

Explanation of icons

Command type

Handling strings

Structure of this reference

Object Properties

[V]  Show the variable

(f)  Variable operations

<p>  Page navigation

bar{}  Progress bar display

bgm{}  BGM playing

brt{}  Brightness Set / Get

ckb{}  Checkbox display

cmd{}  Batch execution

dsp{}  String indicator

fmt{}  Format string display

if{}  Branching

int{}  Interval processing

img{}  Image display

msg{}  Message box display

out{}  Text output

pad{}  Keypad Input

pro{}  Property Change/Get

pwd{}  Password input/setup

rnd{}  Random number

sel{} Item selection(Selector)

slp{}  Backlight Set / Get

snd{}  Sound effects

swi{}  Switch condition branch

tim{}  Display date and time

tms{}  Set date and time 

var{}  Read variables

vol{}  Volume Set / Get

 


 

Explanation of icons

Icons

Descriptions

Object required

ON_DISP

eLXg, ACR

Iɐꂽ־

Commands reflected in the display

Requirement

Not executable

ACR

Iɐꂽ־

Commands executed by touch operation

Requirement

Executable

wiɁE#10;
x̐xŎIɐꂽ־

Commands specified in einput.txtf and
specified within command

Unnecessary

-----

 

 

Command type

General command

Description

[ ]

Show variables

< >

Move page

( )

Variable operation

xxx{ }

TOMATE command

g g

Output to file of goutput.txth

 

 

Handling strings

l The TOMATE command is basically composed of a three-letter statement and { }.
  There should be no space between the command and {.
  Example) In the command pad{ }, do not put a space between "pad" and "{" like pad_{}.

l  Line breaks in strings are "\n" (ASCII: 0x5C 0x6E).

l  There is no distinction between character strings and numbers, and character strings and numbers are automatically distinguished.
   All characters except single quotes are treated as strings.
   In the case of operation statements, the right side is recognized as a "character string" enclosed in single quotation marks.

l When describing a character string to be displayed such as a message in a script, it can be described as it is.
  However, if you use parentheses, commas, colons, and other character strings used in commands in the character string,
  you can treat them as a single character string by enclosing them in single quotation marks.
  Example)
     The command pad { Filter (ms) : 0 , 1000}  will cause a compile error because () is used in the title column.

@   pad{eFilter (ms)f: 0 , 1000} avoids errors by treating anything enclosed in ' ' as a character string.

l  Single quotes cannot be used in the display string.

 

 

Structure of this reference

Command description contents

Description

l Notes

Description example

 


 

Object Properties

Objects created with Tomate are appended with the following properties:

Property Name

Substance

Changeable
by epro{ }f

ID

Object ID name

No

X

X-position: The X coordinate position of the object

Yes

Y

Y-position: The Y-coordinate position of the object

Yes

W

Width : Horizontal pixels of the object

*1

H

Height : Object vertical pixels

*1

V

Visible : Object display/hide flag, 0 to hide

Yes

B

Blink : Object blink interval flag (x1ms time) , does not blink at 0

Yes

P

Press : Press and hold time (positive number x1ms)
or Repeat press interval (negative number x1ms)

Yes

S

Sound : Touch sound (Registration number of sound source)
Set 0 for silence.

Yes

LC

Line Color: The line color of the object

*2

PC

Paint Color: The fill color of the object

*2

SCRIPT

Script

Yes

 

*1  Only display objects that define edsp{}e / eimg{}e / ebar{}e

*2  Only display objects that define ebar{ }f / edsp{ }f

 

l    Property ePf is a long press time with a positive value and a repeat time with a negative value.

See epro{ }f command for an example.

 


 

 

[V]  Show the variable      \ɔfR}h

[Variable ]

Display the value of a variable in an object.

[variable ]    Show variable contents in target shape object

 

l    Enclose in [ ]

l    Variable names must be set in TOMATE's variable list

l    It is displayed in the font specified in the TOMATE app.

 

[num]   Display the contents of the variable name enume in an object.

 


 

(f)  Variable operations        ^b`ɂĎsR}hinput.txt ɂĎsR}h

( Formula : Lower|[ V], Upper|[ V] )

Calculate an expression enclosed in parentheses ().

Formula                  Formulaes format is e(Variable) (Expression) (Value) e

(Variable)           Variable name  * The e[ ] e is not required.

(Expression)        Substitution and Calculation are assigned from the right side to the left side.

Contents

Expressions

Substitution

=

Addition

+=

Subtract

-=

Multiplication

*=

Division

/=

Remainder

%=

 

                               Comparison gives a true (=1) or false (=0) results of the left and right sides.

Contents

Expressions

Equivalence

==

Except

!=

Less than

< 

Greater than

> 

Or more

<=

Or less

>=

 

(Value)                numeric value or [variable]  * e[]f is required for variable

Lower| [V]             Lower limit of the lower value. [Variable] is also allowed. (optional)

Upper| [V]             Upper limit of upper value. [variable] is also allowed. (optional)
If the value is a string, the maximum number of characters is used.

                                   * Operation when only one Lower or Upper is specified

Contents

Expressions

Lower

Upper

Substitution

=

 

Addition

+=

 

Subtract

-=

 

Multiplication

*=

 

Division

/=

 

Remainder

%=

 

 

 

l  Enclose arithmetic expressions in parentheses ().

l  Operations are only assignment operations.

l  When the variable and the value are enumericf, it becomes a numerical operation.

l  The display of the decimal point depends on the number of decimal places of the used variable or real number.

l  Rounding less than the displayed value is round to even numbers.
(If there is no decimal point, an even number + 0.5 is erounded downf and an odd number + 0.5 is erounded upf)

l  Numeric values are treated as strings by enclosing them in single quotation marks(').

l  If either is a echaracter stringe, the character string is added or deleted.
(*=, /=, %= are not allowed in strings)

l  In the case of comparison, '1' or '0' is the return value, and in the case of assignment/operation, the variable content on the left side is the return value.

l  In the case of >, >=, <, <= comparison, they are converted to floating point type and compared.
== and != are compared as strings.

(var = 100)                 Assign 10 0 to [var]

(var += [x]:0,3)           var=var+ value of [x] (If the upper limit exceeds 3, it loops to 0)

(var += 1:10)               var=var+1 (10 or higher holds to 10)

(var -= 1:0)                 var=var-1 (0 or lower holds to 0)

(var -= 10:[a],[b])     var=var-10 ([a] and [b] below)

(str = AB)                    str is the string eABe

(str+=C)                       Add eCe to the end of the string str

(str -= 2)                     Remove two characters from the end of str

(num += '2')                Add e2f as a string to the end of [num]

(str -= ' ')                      Delete one character from the end of [str] (characters within ' ' are ignored)

(str += 'A':10)              Add the character 'A' to the end of [str] (11 characters or more cannot be added)

if{ (a > 10) : (a=0) }                  If variable [a] exceeds 10, set it to 0.

if{ (str==OK) : <@next> }      If variable [str] is eOKf, go to next page.

 


 

 

<p>  Page navigation          ^b`ɂĎsR}hinput.txt ɂĎsR}h

<page |  [V] : 1 >

Go to the specified page.

<page>                Go to page name page (variable is also acceptable)

<@next>              Move to next page (page order in TOMATE)

<@prev>            Previous page move (page order in TOMATE)

<@back>            Back to the previous page

<page:1>            Display page on top of current page (currently page is page)

<@get>               Get the current page name (output the current page name to output.txt)

l  Enclose the page specification within e< >f.

l  When an object with a page navigation command is touched, the specified page will be displayed.

l  When the page is navigated to, the script written in the page's gON_DISPh will be executed.

l  The <@get> command is applicable from version 1.03 onwards.

When Tomate is specified in page name order e1e, e2e, e3e

<1>                             Go to page e1e

<@Next>                 Go to next page e2e

<3:1>                         The current e2e page is overlaid with the page e3e

<@prev>                 Show page e2e before e3e

<@back>                  Show page e3e immediately preceding (do not overlap the current page)

<[page]>                   Go to page name stored in variable the [page]

<@get>                     The current page name is output to output.txt enclosed in '< >'
                                       (if the current page name is '1', it will be output as '<1>')

 

 


 

bar{}  Progress bar display   \ɔfR}h

bar{ [V] : Max |[ V] : H| V }

Show a progress bar.

[V]                Variable name to store progress value (required)

Max| [V]      Maximum value variable allowed (minimum value is fixed 0)

                       Negative numbers can be specified. (minimum value is negative and maximum value is                          fixed at 0) * v1.2 and later

H| V             Progress bar orientation (optional)    

                         'H' = Progress in landscape orientation (left to right)

                'V' = Progress in portrait orientation (bottom to up)

l If the orientation is omitted, it is in landscape orientation.

l The size, position, and color of the bars reflect the content specified in the Tomate tool.

l If a negative number is specified for the maximum value, the left (bottom) will be the minimum value, 0 will be the maximum value, and by subtracting the variable, the progress will be in the opposite direction to a positive number. (Supported from v1.2 onwards)

bar{ [i] : 100 }

Display a horizontal progress bar corresponding to the value of [i] as an upper limit of 100

bar{num : 255 : V}

As the upper limit of 255, display a vertical progress bar corresponding to the value of [num]

  bar{[temp] : -60 : V}

              Displays a vertical progress bar corresponding to the value of [num], with an upper limit of 0               and a lower limit of -60.  0 is the maximum and displays an empty bar. As [num] decreases,               the bar progresses downward.

 


 

bgm{}  BGM playing            ^b`ɂĎsR}hinput.txt ɂĎsR}h

bgm{ file | No | [V], cmd : volume }

Sounds BGM from the BGM registration list and file name.

File                File name that exists in current folder.
                           Raspberry Pi : ehome/user/Tomate/f
                           Windows:  Where the eproject-name.exef is.

No                Or BGM list number registered in Tomate or [variable]          

cmd               0=Stop, 1~99=Playback number of times, -1=Continuous loop playback,
                         100 or more = Fade out stop (value is fade time (x1ms))

Volume        Set volume 0~100 (optional)

l  The sound formats that can be used are ".wav", ".mp3", and ".mid".

l  When ecmde is omitted, BGM is played once.

l  The specified number of times of reproduction is from 3 times.
(If 2 is specified, it will be played only once)

l  Volume is the volume relative to the current system volume. (If system volume = 80%, specified volume = 50%, the playback volume will be 40% of the system volume)

l  If a new playback command is issued during music playback, the previous music will be interrupted and played.

l  If Volume is omitted, the system will play at the current volume.

l  efile | No | [V]f is ignored during stop command (cmd=0).

bgm{ 1,-1 : 50 }

Loop playback of the first sound source in the sound source list at 50% volume

bgm{ sound.mp3, 1 }

Play esound.mp3e in current folder once at current volume

bgm{ 1 , 3000 }

Stop the currently playing BGM fade out in 3 seconds

 


 

brt{}  Brightness Set / Get    ^b`ɂĎsR}hinput.txt ɂĎsR}h

brt{ Value | [V] : @get }

Set the brightness of the backlight

Value| [V]          Brightness 0~255 or [variable]             

@get                   Get current brightness (optional)                     

l  Anything outside the range and non-numeric values are ignored.

l  If f@getf is specified, a variable must be specified.

l  Enter the ebrt{ }f command during sleep to wake up.

l  The setting value is stored in the current path.

brt{ 50 }

Set brightness to 50

brt{ [V] }

Set the luminance to the value of the variable [V]

brt{ [V] : @get }

Get the current luminance in variable [V]

  brt{ }

Wake at current brightness on sleep.

 

 


 

ckb{}  Checkbox display    \ɔfR}h^b`ɂĎsR}h

ckb{ [var ] : strings : mark0, mark1 }

Show checkboxes.

[var]             A variable that stores the check value

strings        Strings to display

mark0        Uncheck Mark character (optional)

mark1        Mark character with check (optional)

l  Display a checkbox to the left of the strings, and when clicking the object, the box switches the checking.

l  The variable is e1f in checking, e0f in un-checking.

l Checkbox character
Unchecked (var=0)   (Unicode: 25A1)
Checked (var!=0)      (Unicode: 2611)

l The checkbox depends on the font style.

ckb{ [var] : }

   Display check box only.

ckb{ [var] : Options }

          Display e Optionsf on the object and change the value with clicking.

ckb{ [var] : Do not display from next time: -, + }

  "- Do not display from next time" is displayed, and when touched, it changes to e+f.

ckb{ [var] : : OFF, O N }

  Displays "OFF" or "ON" according to the value of the variable [var]

 


 

cmd{}  Batch execution       ^b`ɂĎsR}hinput.txt ɂĎsR}h

cmd{ cmd1 : cmd2 : ... : cmdN   }

Run commands in bulk.

cmd1                    1st command

cmd2                    2nd command

cmdN                    Nth command

l Commands separated by colons e:f

cmd{ (a+=1) : (b+=1) : (c-=10) : (d*=10) }

Combine arithmetic expressions in bulk

if{ (V==0) : cmd{ (a+=1) : (b+=1)} : cmd{ (c=10) : (d=10) } }

    Example of combining commands in a batch with an if statement

 


 

dsp{}  String indicator       \ɔfR}h

dsp{ [var] : N=strN, fcolN, bcolN : ...  }

Display text in the specified color scheme.

The display is the same as the value specified in the variable.

[var]                         A variable that stores the value

N                              Corresponding value (else in '*')

strN                        Corresponding display string (Variables can be specified)

fcolN                      Text color (optional)

bcolN                    background color (optional)

 

l Display the string s tr corresponding to the value of the var variable in the object specified by Tomate in the specified color of efcolNe and ebcolNe.

l Color notation can be in RGB color number #000000 ~ #FFFFFF format or color name notation such as eblacke, ewhitee, ebluee, etc.

l If the text color and background color are omitted, it depends on the drawing object.

l You can specify variables enclosed in [ ] in the display string. (Ver1.01 and later)

dsp{ [val] : *=Kuro, black : 1=Aka, red : 2=Ao, blue : 3=Shiro : white, gray }

     When val=1, eAkae is displayed in red letters, when val=2 is displayed as eAoe in blue letters, when val=3, eShiroe is displayed in White letters on an ash background, and otherwise eKuroe is displayed in black letters.

dsp{ [val] : *=ITEM0,#000000,#FFFFFF : 1=ITEM1,#FFFFFF,#FF0000 : 2=ITEM3,#FFFFFF,#0080FF }

Example of specifying the color notation with RGB number

dsp{ [gender] : male=Mr. George, female= Ms. Mary }

Example in case of the variable is not number.

dsp{ [i] : 0=[name1] : 1=[name2], white, red : *=[name3], white, red }

     Example of specifying a variable in the display string

 

 

fmt{}  Format string display       \ɔfR}h

fmt{ string including [var]  }

Displays a string.

You can display the contents of a variable by adding [var].

String        Any string

[var]          Any variable

l  Displays a string containing the contents of the [var] variable in the object.

l  Multiple [var]s can be written in the displayed string.

l  Single quotation marks ' ' within the string are ignored.

l  Characters such as [ ] cannot be used within the string other than for variable specifications.

l  Compatible with TOMATE v1.2 and later

*Given (month=8): (season=summer)

fmt{ This month is [month] and the season is [season]. }

The object displays "This month is August and the season is summer."

*Given (temp=28): (humi=50)

fmt{ Temperature [temp] C\n Humidity [humi] %}

The object displays "Temperature 28 C" (Line break) and "Humidity 50%" in two lines.

 


 

if{}  Branching                 ^b`ɂĎsR}hinput.txt ɂĎsR}h

if{ (formula ) : True-cmd : False-cmd }

Branch processing is performed based on the result of comparison operation.

(formula)      Right-hand side [comparison expression ==, !=, >, <, >=, <=]         

                          Multiple comparison expressions include &(and), | (or) can be used

True-cmd   When the comparison is true, the command to be executed

False-cmd   When the comparison is false, the command to be executed (Optional)

l The comparative expression is of the form of only two terms
(Left-hand side [expression] right-hand side).

l The left-hand side is variable only, and the variable symbol [ ] can be omitted.

l The variable [ ] on the right side is necessary.
(If omitted, it will be treated as a character string.)

l In the case of >, >=, <, <= comparison, they are converted to floating point type and compared.
== and != are compared as strings.

if{ (var==1) : <@next> }

if{ (var==1) : msg{Var is true} : msg{Var is false} }

if{ (v1<[v2] & v3<[v4]) : msg{ It is true. } : msg{ It is false. } }

if{ (V1>=[V2] | V3>=[V4] | V5>=[V6]) : msg{ TRUE. } : msg{ FALSE. } }


 

 

int{}  Interval processing      ^b`ɂĎsR}hinput.txt ɂĎsR}h

int{ time : cmd }

Perform processing at specified time intervals.

time      interval time (x1ms)

cmd      command

l  Only one interval operation is performed in all screens.

l  Interval processing stops when the page switches.

int{ 1000 : (tm+=1) }

+1 the variable [tm] at 1 second intervals


 

 

img{}  Image display        \ɔfR}h

img{ file |  list-No |  [V] | (f)  }

Display the specified image in the frame range of the drawing object.

file                 File name that exists in current folder.
                           Raspberry Pi : ehome/user/Tomate/f
                           Windows:  Where the eproject-name.exef file is.

list-No        Or the image number registered in Tomate's image list

[V]| (f)       Or [variable] (arithmetic expression)

l The size of the image is automatically scaled to the W,H ratio of the object frame, keeping the ratio of the original image.

img{ image.jpg }

          Display the image of eimage.jpgf in the object frame.

img{1}

          Display the first image of the registered image list in the object frame.

img{ [num] }

          Display the variable [num]-th image in the registered image list in the object frame.


 

 

msg{}  Message box display   ^b`ɂĎsR}hinput.txt ɂĎsR}h

msg{ Message : Btn1=Cmd1, Btn2=Cmd2, Btn3=Cmd3 : @wait =millisecond }

Display a message box.

Message                 To display messages

Btn1~3                    Characters to display in button # (optional)

Cmd 1~3                Command to execute when button # is pressed (optional)   

@wait                    Time to auto-erase message box in x1ms (optional)

l Message statements can be newline with e\ne (ASCII:0x5C,0x6E) character.

l If eCmd#e is omitted, only the button is displayed.

l If eBtn#e is omitted, the OK button is automatically added.

l Omitting eBtn#e when e@waite is specified hides the button.

l When the button is pressed, the message box is closed.

l Multiple [variables] can be inserted into the message string, and will be replaced with the variable values. However, if '[' or ']' is included other than variable specifications, variable substitution will not be performed. (v1.2 and later)

msg{ Changed settings. }

with the OK button automatically

msg{ Are you sure to delete the file? : OK=hREMOVEh , Cancel }

Press OK to output the eREMOVEe string to eoutput .txte.

msg{ password is different. : @wait=3000 }
Displays a message and automatically erases after 3000ms (3 seconds)

msg{ An error occurred. \n[errmsg]\n[errno] : Confirm}

  Displays the message "An error occurred." along with the values ​​of the variables [errmsg] and [errno], and displays a "Confirm" button.

 


 

out{}  Text output             ^b`ɂĎsR}hinput.txt ɂĎsR}h

out{ strings | [V] | @clr }

gstringsh

Outputs the specified character string to [output.txt].

Strings                  Prints the specified string

[V]                         Output variable contents

@clr                       Clear output.txt contents

l  If it is a fixed string, it may be simply enclosed in double quotation marks (g).

l  When written in Script, the specified string is written to output.txt each time the corresponding object is touched.

l  This character string can be read by a user program or the like to determine which object is being touched.

gHelloh                        Added eHellof to output.txt.

out{ [var] }                 Append the contents of the variable [var] to output.txt.

out{ @clr }                 Clear the contents of output.txt.


 

 

pad{}  Keypad Input           ^b`ɂĎsR}hinput.txt ɂĎsR}h

[var] : pad{Title, Min, Max, Digit : Cmd }

pad{ [var] : Title, Min, Max, Digit : Cmd }

Display a keypad for entering numbers and letters.

[var]          Name of the variable to be set
                       (value is displayed when written outside, hidden when written inside)

Title           Messages to display on the Title keypad

Min          Minimum value if set to numeric (optional)

Max         Maximum value when set to numeric value (optional)

Digit        Maximum number of digits that can be entered,
                            including decimal point and sign (optional)

Cmd            Command to run after setting the value (optional)

l When Min, Max is set, the string of eMin ~ Maxe value is added to eTitlee.

l If Min and Max are omitted, it becomes a character string. (Can be used for IP and TEL)

l When there is only one eMine, eMaxe, or eDigite item, eDigite is specified.

l If eMine and eMaxe is specified, the enterable decimal places are the decimal places of eMine.

l If eDigite is set and there is more input than the specified digits, the input will not be accepted.

l If Min, Max and Digit are not specified, the maximum input digits will be 16 digits.

[num] : pad{enter a number,0,9999 : msg{ numeric. } }

Display the keypad, assign the entered value 0~9999 to the variable num and display the value on the object. Display message after confirming input.

  [num] : pad{ Input value : 0.001, 9999, 5 }

    Accepts input up to 5 digits including the decimal point in the range of 0.001 to 9999.

pad{ [str] : Enter IP address, 15 }

Display the keypad, assign the entered 15-digit value as a string to the variable [str], but the value is not displayed on the object. (In the case of a character string specification, multiple periods and hyphens can be entered.)

 


 

 

pro{}  Property Change/Get   ^b`ɂĎsR}hinput.txt ɂĎsR}h

pro{ page, ID, prop, val | [V]| (f) : @get}

Change the properties of an object.

page                        Name (only '@' mark for current page)

ID                            Object ID in the page

prop                       Object properties (X, Y, W, H, V, B, P, LC, PC, Script)

value| [V]|(f)        Property value or variable or comparison operation expression

@get                      Get the current contents to variable [V]         

l Calculation expressions are True='1', False='0', which is limited only to comparison expressions (arithmetic expressions such as +=, -=, etc. are always true)

pro{ page1, IMG_001, V, 0 }

Set the 0 (erase) to the V (visible) of the ID gIMG_001h in page1

pro{ @, BOX, V, (val==0) }

Set the result of (val==0) to the ID eBOXf object display of the current page

 


 

 

pwd{}  Password input/setup ^b`ɂĎsR}hinput.txt ɂĎsR}h

pwd{ [var ] | pass : Title | @setup : Cmd1 : Cmd2 }

Display a keypad for entering passwords.

[var] | pass         A variable that contains the password or password value

Title | @setup    Messages to display on the Title keypad, or setup the password.

Cmd1                    Command to run on match

Cmd2                    Command to run on mismatch

l Setting eTitlee to e@setupe sets a password, and you can set it by entering the password twice. (Password setting is required for variables)

l In the Title column in the password setting, the PWD1 and PWD2 messages registered in "Keypad" of "Parts Edit" are displayed for the first and second times.

l The maximum number of digits that can be entered for a password is 16 characters.

pwd{ [pass] : Enter password : <@next> : msg{ Wrong code! } }

The entered value matches the value of the variable [pass] on the next page, and the message is displayed when there is a mismatch.

pwd{ 1234 : Enter the code : <page> : snd{4} }

The value entered is 1234 and the page moves in the match, the sound rings in the mismatch.

[Example of password change]

pwd{ [pass] : @setup : msg{ password changed. } : msg{ Please try again. }}

Enter the password twice, and if the two match, store it in the variable the [pass].


 

 

rnd{}  Random number        ^b`ɂĎsR}hinput.txt ɂĎsR}h

rnd{ [V] : min, max : seed }

Generate random numbers.

[V]            Variable to store random numbers

min           Lower bound of random numbers

max           Maximum upper bound of random numbers

l  Once the seed value is set, the random numbers generated thereafter will be based on the set seed value.

rnd{ [num] : 1, 1000 }

Generate random numbers in the range of 1~1000 and store them in [num]

rnd{ [num] : 1, 1000 : 365 }

In the range of 1 ~ 1000, generate a random number with a seed value of 365 and store it in [num]

 


 

 

sel{} Item selection(Selector) ^b`ɂĎsR}hinput.txt ɂĎsR}h

[val] :  sel{ Title : n0=dsp0, n1=dsp1 , ... : Cmd  }

sel{ [val] :Title : n0=dsp0, n1= dsp1, ... : Cmd  }

Show a selector tool to select an item.

[var]           A variable that stores the value of the selected item
                     (Item name is displayed when written outside, hidden when written inside)

Title            Messages to display on the Selector parts

n# =           Value of item # (optional)

dsp#          Item# display name

Cmd            Command to execute after selection (optional)

l  When a DSP string is displayed in the item field of the selector and selected, the item number is stored in the variable [var].

l  When a variable is written outside the command, the display name corresponding to the value is displayed.

l  The value corresponding to the display name can be either a numerical value or a character string.

l  If the number of items exceeds the number of items displayed on one page of the selector, a page switching button is automatically displayed on the selector.

l  If the item number is omitted, a sequence number of 0~ is automatically added.

l  If the selection is canceled (by touching outside the frame), the command will not be executed.

[var] : sel{ Select region : 0=Other, 1=Northeast, 2=Midwest, 3=South, 4=West }

The target object displays the name of the selected region, and var stores the number.

sel{ [var] : Select gender :Other, Male, Female }

The number selected as 0=Other, 1=Male, 2=Female is stored in [var].
The object does not display a gender.

sel{ [x] : Select value : 1,2,3,4,5 : <@next> }

1, 2, 3, 4, and 5 are displayed as options, and when selected, the page moves to the next page. When an item is selected, 0 to 4 will be stored in the variable [x].


 

 

slp{}  Backlight Set / Get      ^b`ɂĎsR}hinput.txt ɂĎsR}h

slp{ Second | [V] : @get }

Set the automatic off-time of the backlight when inoperative

Second| [V]       Auto-off time (seconds) or [variable] 

@get                   Get the current setting value to [Variable]                   

l  Anything other than a number is ignored.

l  It lights up when you touch the screen when the light is turned off automatically.

l  If e@getf is specified, a variable must be specified.

l  The setting value is stored in the current path.

slp{ 900 }

Set the auto-off time to 15 minutes.
 slp{ [V] }

Set the automatic light off time to the value of variable [V].
 slp{ [V] : @get }

Stores the current off setting time in variable [V].

 


 

snd{}  Sound effects          ^b`ɂĎsR}hinput.txt ɂĎsR}h

snd{ file | No | [V], loop : volume }

Play sound effects from the sound effect registration list or file name.

File                        File name that exists in current folder.
                                         Raspberry Pi : ehome/user/Tomate/f
                                         Windows:  Where the eproject-name.exef file is.

No or [V]              Tomate registered sound source list number or [variable]

loop                     Loop count 0~10 (optional)

volume               Volume 0~100 (Optional)

l  The only sound format that can be used is e.wavf format.
(".mp3" can also be used when running on Windows)

l  If loop is omitted, it is played once.

l  If loop is set to 0, the sound effect stops playing.

l  Volume is the volume relative to the current system volume. (If system volume = 80%, specified volume = 50%, the playback volume will be 40% of the system volume)

l  If Volume is omitted, it will be played at the current system volume.

snd{ 1 }

Play the first sound source in the sound source list once (volume is the current value)

snd{ beep.wav, 2 : 100 }

Ring the ebeep.wavf in current folder twice at 100% volume

 


 

 

swi{ }  Switch condition branch   ^b`ɂĎsR}hinput.txt ɂĎsR}h

swi{ [var]|(f) : V=cmd : c : VN=cmdN : @=dflt }

Compare with the value of the variable var and branch to switch or case.

           [var]|(f)           Variable or expression that stores the value to be compared

           V=                      Comparison value such as a number or string (constants only) (optional)

           cmd                   Command or expression when matched

              *=dflt               Command when default is specified (optional)

l  Executes the command whose comparison value matches the variable [var].

l  The comparison value eV=f can be omitted. If omitted, a consecutive number starting from 0 will be automatically assigned.

l  The comparison value can be either a number or a string.

l  Compatible with TOMATE v1.02.0 and later

swi{ [i] : 1=(str=fAf) : 2=(str=fBf) : 3=(str=fCf) : *=(str=f e) }

When the content of variable i is 1, A is stored in variable str, when it is 2, when it is 3, C is stored in variable str otherwise blank is stored.

swi{ [i] : *=(str=f e) : (str=fAf) : (str=fBf) : (str=fCf) }

The above comparison value is omitted. @= is 0 or other, and a consecutive number from 1 is specified.

swi{ (s) : Spring=(i=4) : Summer=(i=7) : Autumn=(i=9) : Winter=(i=11) }

When the content of variable s is the corresponding string, the value is set to variable i.

 

 

 

tim{}  Display date and time    \ɔfR}h

tim{ format }

Display a clock on an object.

Format           edy/mo/yr  hr:mi:scf etc.

                        yr         AD Year

                        mo      Month

                        dy        Day

                        hr         Time

                        mi         Minute

                        sc         Seconds

                        wk       week    (v1.2 or later)

l  The clock is displayed on the object drawn in Tomate application.

l  Strings such as eyrf, emof, and fdyf are replaced with values from the built-in clock

l  The date is zero-suppressed, and the time is zero-padding.

tim{ mo / dy / yr  hr : mi : sc }

Western calendar, date and time display as g09 / 05 / 2022 12 : 34 : 56h

tim{ hr : mi : sc }

Show clock time only

  time { mo-dy-yr (wk) }

    Displays the date in month-day-year (day of the week) format. Example: 08-22-2025 (Fri)

 


 

tms{}  Set date and time       ^b`ɂĎsR}hinput.txt ɂĎsR}h

tms{ yr=num | [V1], mo=num | [V2], c , sc=num | [V] }

tms{ yr=[V1], mo=[V2], c , sc=[V] : @get }

Sets/gets the current time.

Format                  yr: year  mo: month  dy: day  hr: hour  mi: minute  sc: second

                                 wk : day of week (v1.2 or later)

num | [V]             Number or variable to set

@get                      Get time in variable [V] (Option)

l  Windows system cannot change the clock.

l  When the Raspberry Pi is online, it obtains the time via the network, You cannot change the time.
It can be changed offline.

l  Always specify a variable when @get is attached.

l  The days of the week (wk) are 0=Monday, 1=Tuesday, 2=Wednesday, c, and 6=Sunday.

tms{ yr=2022, mo=10, dy=22,  hr=12, mi=34, sc=00 }

        Set the year, date and time to '2022/10/22 12:34:00'

tms{ hr=[hour], mi=[minute], sc=[sec] }
         Set the current time to the value of a variable

tms{ yr=[Y], mo=[M], dy=[D],  hr=[h], mi=[m], sc=[s] : @get }

        Store the current date and time in variables

tms{ hr=[h], mi=[m], sc=[s] : @get }

      Store only the current time in variables

 

 

 

var{}  Read variables           ^b`ɂĎsR}hinput.txt ɂĎsR}h

var{ V1, V2, EEE , Vn : Flag }

Prints the contents of the specified variable to eoutput.txtf.

V1            1st variable name

V2            2nd variable name

Vn            n variable name

Flag         If h:flagh is specified, output with evariable name=f (optional)

l Separated by commas, multiple variables can be specified together.

l The contents of the specified variables are printed to output.txt, enclosed in { } and separated by commas, in the order specified.

l String newlines are appended as string e\nf.

l The g:Flagh specification only requires a colon and string, and the contents of Flag are ignored.

var{ a, b, msg, str }

Return value (output.txt) à { 10, 5, Hello!\nWorld, Apple }

var{ a, b, msg, str :1 }

Return value (output.txt) à { a=10, b=5, msg=Hello!\nWorld, str=Apple }

 


 

 

vol{}  Volume Set / Get      ^b`ɂĎsR}hinput.txt ɂĎsR}h

vol{ Value | [V] : @get }

Set the system volume

Value| [V]          Set volume to 0~100 or [Variable]      

@get                   Store the current volume in variable [V] (optional)   

l  The esnd{}f, ebgm{}e commands are played based on this volume.

l  The volume cannot be changed during playback.

l  If e@getf is specified, a variable must be specified.

l  The setting value is stored in the current path.

vol{ 50 }

          Set volume to 50%

vol{ [V] }

          Set the volume to the value of the variable [V]

vol{ [V] : @get }

          Store the currently set volume to [V]

 


 

 

 

 

 

 

 

 

Revision History

Copyright© 2022  Clues Inc.  https://clues.jp

Reproduction and copy without permission are prohibited.