- iRidi Studio 2019
- Actions when interface items are pressed
Actions when interface items are pressed
Interface objects that can execute commands when pressed include pages and graphic items: labels, buttons, levels, joysticks, and others.
- Popup windows cannot execute commands when pressed.
- In addition to ordinary presses, pages can process gestures, such as swiping from the edge of the screen.
Pages and windows of the visualization interface contain objects that perform actions when pressed or change appearance when data is received from equipment. An item's behavior depends on its settings, but all commands it sends are shown on PROGRAMMING.
Select an object in the workspace and open PROGRAMMING to see which actions it performs and when:

Touching the screen, releasing it, and moving an item are different events to which the graphic interface can respond. Pages, graphic items, and list entries support different event sets and therefore follow different command-sending rules.
Main events:
- Press - send commands when the button is touched;
- Release - send commands when the button is released;
- Hold - send commands repeatedly while the item is held;
- End of hold - send commands once when a previously held button is released;
- Move - send commands when a slider or joystick moves;
- Select - select an entry and subentry in List (a scripted list). Access through List API;
- Enter - press Enter in Edit Box;
- Change - a character-input event in Edit Box. Access through GUI API;
- Lost Focus - an event generated on release by any item, regardless of its type or conditions. It means the item loses focus (activity). It can only be handled through GUI API;
- Gestures - gestures (swipes). Only a page processes gestures (they cannot be configured for a window or an area on an item). A gesture can start on the page, a graphic item, or a window, but is passed to the parent page, whose configured commands execute. Exceptions are Level, Joystick, List, and Static List, which process Move instead of gestures. Download an example of using gestures.
Studio settings include Adaptation of "Programming" tab, which changes how information is displayed on PROGRAMMING when enabled.
Interface event sequence
On a page or popup not included in Static List or List, buttons behave as follows:
- a short press generates Press > Release ;
- a long press generates Press > Hold > End of hold ;
- moving a Level or Joystick slider generates Press > Move > Release ;
- releasing any item generates Lost Focus .
In List and Static List , scrolling can interrupt the event sequence. Scrolling can begin on a popup or graphic item and stop command execution:
- starting to scroll disables Release, so a short press with movement triggers Press, followed by scrolling;
- starting to scroll immediately stops Hold and generates End of hold;
- releasing any item generates Lost Focus.
Tips for configuring command execution:
- For a button on an ordinary page, commands must be assigned to Press; for a button in a list, to Release.
- If a button must execute different commands for a short and long press (once), assign the "short" command to Release and the "long" command to Hold, adjusting HoldTime.
- To send a pulse (1 followed by 0) on a short press, there are two methods:
- assign sending 1 to Press and sending 0 to Release. This lets you control pulse duration by how long the button is held. In a list, however, scrolling cancels Release, so sending 0 must also be assigned to End of hold.
- assign both commands, 1 and 0, to Release, with a Delay between them. The pulse has a fixed duration and works predictably in lists.
Macros Editor
Commands executed when an event triggers, called macros, are configured by clicking [+] beside the event name:


- Enabling Adaptation of "Programming" tab changes the appearance of Programming and the Relations window.
Macro commands execute sequentially from top to bottom. Available commands:
- Actions (page-switching commands):
- Show page [page name]. Open a page (only 1 page can be open at a time). Specify the page name in the command parameters;
- Show previous page. Show the previously open project page;
- Show popup [popup name]. Show a popup (many popups can be shown simultaneously). Specify the popup name and, optionally, its display coordinates in the command parameters;
- Hide popup [popup name]. Hide a popup;
- Toggle popup [popup name]. Toggle a popup (show it if hidden, hide it if shown);
- Hide popup group [popup group name]. Hide popups belonging to the group;
- Hide popups on page [page name]. Hide all popups on a page;
- Hide all popups. Hide all popups in the interface.
- Sounds (sound control):
- Play sound [file, track number, volume, loop]. Start playing an audio file;
- Play system sound [sound, track number, volume]. Play a standard sound;
- Stop sound [file]. Stop playing an audio file;
- Stop slot [track number]. Stop playing the audio file on the specified track;
- Stop all sounds. Stop all sound playback in the project;
- Send to driver (send values to driver commands):
- Number. Send a constant decimal number (DEC);
- Text. Send a constant data string (ASCII);
- Data. Send constant binary data (BIN);
- Send to object (send data to variables: item properties, drivers, and project tokens):
- Number. Write a constant (DEC number) to a variable;
- Text. Write a constant (ASCII string) to a variable;
- Value from object. Write one variable to another (for example, an item property to a project token).
- Other (other commands):
- Delay. Set a delay between macro commands (freely configurable);
- Script Call. Call an iRidi Script function by name;
- Keyboard [keyboard type]. Open the control panel's virtual keyboard;
- Hide keyboard. Hide the control panel's virtual keyboard;
- Minimize (for Windows). Minimize i3 pro;
- Execute [command string]. Execute a standard OS command, for example open a browser URL (http://iridiummobile.ru/), send email to an address (mailto:example@mail.ru), open the calculator (calc), or execute other standard commands for different operating systems;
- Show system menu. Open the system menu;
- Show project menu. Open the i3 pro project-selection sidebar;
- Paste from clipboard. Paste clipboard text into the active Editbox;
- Show paste helper. Display a native popup above the cursor in the active EditBox, scaled to the project resolution: PasteHelper labeled Paste, similar to the paste tool on iOS and Android devices. Pressing this popup executes Paste from clipboard. Pressing the paste popup, pressing the input field again, or changing focus immediately closes PasteHelper;
- Exit. Close iRidi App on the control panel (Windows and Android only).
- Routines (configuring editable routines):
- Reset settings of all routines. Reset all rule settings;
- Edit routine settings [rule name]. Change a rule's settings;
- Show list of all routines. Open the list of all routines available for editing;
- Edit routine settings in list [rule name] (old). Change a rule's settings in the list.
Contextual navigation
Programming lets you navigate quickly to an item used in a macro or relation and focus it. When a linked item exists, open the relation or macro's context menu and select "Перейти к" (go to) followed by the item name.

The following occurs:
- the tab containing the destination item opens or becomes active (for example, a script, graphic item, sound, or token)
- the item receives focus where possible
Exceptions are these tabs:
- System tokens: the system-token tab receives focus, but the linked token does not
- Script editor: the script-editor tab and the file containing the called function receive focus, but the function's line does not.
The context menu for navigating to linked items uses icons introduced with adaptive mode for Programming. Adaptive mode does not have to be enabled for this navigation to work!
Script Call: activating a JS function
Script Call invokes a JS function created in the script editor but cannot pass call parameters. A reference to the item that called the function is passed as the call context (this).
For example, a function that takes the Text property of the calling item, increments it by one, and writes it back:
var a = 0;
function action() {
a += 1;
this.Text = a; // this - элемент, который вызывал функцию, .Text - свойство "текст" элемента
IR.Log(this.Name); // имя элемента, который вызвал функцию
IR.Log(this.Parent.Name); // имя страницы, на которой находится элемент, вызвавший функцию
};
Relations: item links
In the Relations window, links are created to transfer data from one object to another:


- Enabling Adaptation of "Programming" tab changes the appearance of Programming and the Relations window.
For example, the value received from the slider of level Item 1 can change the coordinate of item Item 2 . Graphic item, page, and popup parameters can interact, as can channels and tokens (global variables).