Navigation:  Reference > Properties >

System Properties

Previous pageReturn to chapter overviewNext page

ForeUI has some predefined system properties for you to get some information from the environment.  The name of the system properties are all capital.

To insert a system property into expression, you can click the insert_prop_button button beside the input field and choose "Insert System Property..." in popup menu.

insert_sys_prop

Then you can choose the system property from a drop-down list:

choose_sys_prop

Here are all available system properties in ForeUI (you can also review them in the System Property View).

 

Name

Type

Description

Comment

SCREEN_WIDTH

Number

The width of the screen

"Screen" means the page here

SCREEN_HEIGHT

Number

The height of the screen

"Screen" means the page here

CURRENT_PAGE_INDEX

Number

The index of the current page

Index starts with 1

CURRENT_PAGE_TITLE

String

The title of current page


AVAILABLE_PAGE_INDICES

Array

Indices for available pages as array

All pages except those in the excluded folders

AVAILABLE_PAGE_TITLES

Array

Titles for available pages as array

All pages except those in the excluded folders

CURRENT_YEAR

Number

Current year

4 digits number.  e.g. 2011

CURRENT_MONTH

Number

Current month

1-2 digits number.

CURRENT_DAY

Number

Current day in the month

1-2 digits number

CURRENT_HOURS

Number

Current hours in the day

1-2 digits number

CURRENT_MINUTES

Number

Current minutes in the hour

1-2 digits number

CURRENT_SECONDS

Number

Current seconds in the minute

1-2 digits number

CURRENT_TIMESTAMP

Number

Current timestamp

in milliseconds

CURRENT_KEY_CODE

Number

The key code of the current key event

Possible values are listed in Key Code Table

CTRL_KEY_STATE

Number

1 if CTRL is pressed, otherwise 0


ALT_KEY_STATE

Number

1 if ALT is pressed, otherwise 0


SHIFT_KEY_STATE

Number

1 if SHIFT is pressed, otherwise 0


FOCUSED_ELEMENT_ID

String

The Id of focused element


CURRENT_CURSOR_X

Number

The current X position of cursor

Relative to the page, in pixels

CURRENT_CURSOR_Y

Number

The current Y position of cursor

Relative to the page, in pixels

CURRENT_EVENT

Object

The current handling event.

Event object may contain different attributes, according to the event type.

 

You can use the value of system property in any place that supports expression.  For example, the system property that represent the current cursor x coordinate looks like this in the expression (please notice the difference between TEXT and EVAL parsing modes):

exp_text {CURRENT_CURSOR_X}                (current x coordinate of cursor, in TEXT parsing mode)

exp_eval {"CURRENT_CURSOR_X"}                (current x coordinate of cursor, in EVAL parsing mode)

If the system property is in Array type, You will need to access its member in this way: d

exp_text {AVAILABLE_PAGE_TITLES}[1]                (the title of first page, in TEXT parsing mode)

exp_eval {"AVAILABLE_PAGE_TITLES"}[1]                (the title of first page, in EVAL parsing mode)

Remarks: system properties are read-only, you could NOT change their values with action.