# Grid element actions
This chapter is about actions that can be performed if a grid element is selected and how to configure them:
- Edit actions modal
- Action Types
# Edit actions modal
Choosing “Actions” in the Edit grid element menu opens a configuration modal (Fig. 1):
Fig. 1: Edit actions modal
This modal configures the actions that will be performed if the grid element is selected. These are the elements in the action modal:
- New action: adds a new action to the grid, in the combobox the action type has to be selected
- Current actions: list of currently configured actions that will be performed if the grid element is selected
- Speak label: first configured action of this element - speak the label of the element
- Edit: edit and configure the particular action
- Delete: delete the action from this grid element
- Test: tests the action, e.g. speaks the label. This button is not available for all types of actions.
- Cancel: discard any changes and close the modal
- OK: save all changes and close the modal
- OK, edit previous: save all changes and edit the actions of the previous element
- OK, edit next: save all changes and edit the actions of the next element
# Action types
These are the types of actions that are selectable (Fig. 1, number 1):
- Speak label: speaks the label of the element using a computer voice (text-to-speech)
- Navigate to other grid: navigates to another grid
- Speak custom text: speaks a customizeable text using a computer voice (text-to-speech)
- Fill prediction elements: fills all prediction elements in the current grid with word suggestions
- Collect element action: performs actions on collect elements in the current grid, e.g. clearing it or copying it’s text to clipboard
- AsTeRICS Action: do an action in a running model in the AsTeRICS Framework
# Speak label
Clicking on “Edit” on a “speak label” action (or creating a new one) shows the following configuration possibilities:
By default the language of the browser/system is selected. Available languages can differ depending on the browser, from experience Google Chrome offers most languages. Clicking on the “Test” button speaks the label in the selected language.
Note: some browsers like Internet Explorer do not support text-to-speech. In these browsers speak actions will do nothing.
# Navigate to other grid
Clicking on “Edit” on a “navigate to other grid” action (or creating a new one) shows the following configuration possibilities:
“Grid to navigate” selects the grid to switch to if this action is performed. The combobox contains a list of the names of all available grids of the current user.
# Speak custom text
Clicking on “Edit” on a “speak custom text” action (or creating a new one) shows the following configuration possibilities:
For language selection the same conditions as for speak label actions apply. “Text to speak” is the custom text that should be spoken. The button “Test” tests the configuration and speaks the current text.
# Fill prediction elements
The action “fill prediction elements” fills all prediction elements in the grid with word suggestions. Suggestions are calculated on the basis of the label of the current element, so an “fill prediction elements” action of an element with label “A” will fill the prediction elements with the most common words starting with character “A”:
Clicking on “Edit” on a “fill prediction elements” action (or creating a new one) shows the following configuration possibilities:
The meaning of the options is:
- Refresh suggestions on change (only available on collect elements): if checked prediction elements are recalculated and refilled on every change of the collection element on base of the current value of the collection element:
- Dictionary to use: select the dictionary you want to use (see manage dictionaries). If nothing selected words from all available dictionaries will be suggested.
# Collect element action
Collect element actions are various actions that are related to collect elements.
Clicking on “Edit” on a “collect element action” action (or creating a new one) shows the following configuration possibilities:
The possible actions to chose are:
- Clear collect element empties the collect element
- Delete last word deletes the last word of the collection elements:
- Delete last character:
- Copy text to clipboard: copies the current text of the collect element to clipboard in order to be available for paste in other programs
- Append text to clipboard: appends the current text of the collect element to clipboard making it possible to collect longer texts in the clipboard which can be used in another program afterwards
- Clear clipboard: empties the clipboard
# AsTeRICS Action
An “AsTeRICS action” performs an action in a running model in the AsTeRICS Framework. This can be any action that is possible with the AsTeRICS Framework, e.g. controlling a TV or performing computer actions like opening a program.
Figure 2 shows how an AsTeRICS action that controls a TV is working in more detail:
Fig. 2: AsTeRICS action concept, example of controlling a TV
The following steps are shown in Figure 2:
- A user selects a grid element with an associated AsTeRICS action. An AsTeRICS model which can perform the desired action (e.g. controlling a TV) is saved within the current grid.
- The AsTeRICS model is uploaded to a running instance of the AsTeRICS Framework (ARE) and afterwards started. The model contains so-called “plugins” which are elements capable of communicating with external hardware, e.g. attached to the computer or accessible via network. In the example the “IrTrans” plugin is capable of communicating with an IrTrans device, which is a replacement for infrared remotes.
- After uploading and starting the model on the AsTeRICS Framework, data is sent to a plugin contained in the model. In Fig. 2 some data is sent to the “action” port of the IrTrans plugin.
- Sending data to the plugin causes the AsTeRICS Framework to communicate with the external real “IrTrans” hardware. The action contains the needed information to perform the desired action, for instance sending a “Volume down” command to a TV.
- Finally the IrTrans device sends the infrared signal to the TV causing it to reduce the volume.
Clicking on “Edit” on a “AsTeRICS action” action (or creating a new one) shows the following configuration possibilities:
These are the possibilities while configuring an AsTeRICS Action:
- ARE URL: the URL of a running ARE (AsTeRICS Framework) to connect with. Standard URL is
http://127.0.0.1:8081/rest/for a locally running ARE.
- Test URL: click in order to test the current URL. A tick (✓) or times (×) symbol will indicate if the test was successful or has failed.
- ARE Model: if there is already a model of this action defined, the name of it is shown here. A click on the link downloads the model.
- Download from ARE: downloads the currently running model from a running AsTeRICS Framework (ARE) instance and saves it to the grid. The current ARE model is replaced by this action.
- Upload to ARE: uploads the saved model to a running AsTeRICS Framework (ARE) for testing purpose or in order to adapt it.
- Component: selection of the component (plugin) of the selected model that should be used
- Send data: define data that should be sent to a specific port of the component
- Trigger event: selects an event that should be triggered on the selected component (optional, either “send data”, “trigger event” or both can be used)
- Test action: performs the defined AsTeRICS action for testing, same as will be later performed if the grid element is selected
- OK: apply changes and close edit mode of this AsTeRICS action