Switch

A switch is designed to perform actions depending on the current chapter, the current audio/subtitle track number, the selected button of a menu or a custom condition.

The audio/subtitle/chapter number (index) can also be a list or a range: "1,2,3" or "2-4" (without the quotes). The indexes of chapters, audio and subtitle tracks start at 1; for subtitles, 0 means "off".

Please note that "link points" are not counted here. Thus, if you have:

Chapter 1 (play mark)
Chapter 2 (link point)
Chapter 3 (play mark)
you have to use the number 2 for chapter 3 here.

- import a switch from a file.

- export the switch to a file.

To add a new conditional action, select a condition, enter the index or range for Audio/Subtitle/Chapter (or the condition for Custom, see below), select the action by clicking the "..." button and then click the "Add" button.

Add → Add using template - creates several conditions at once, using the current condition and action as a template. It only applies to the Audio/Subtitles/Chapter conditions and to the Jump MENU → button action. It increments the number in the condition and selects the next button of the same menu.

To edit an existing conditional action, select it in the list and double-click it. A middle mouse button click behaves the same way, but additionally starts editing the action (a double-click in the action field opens the quick action edit window if one is available).

To replace an existing conditional action, use the "Replace" button: double-click the conditional action, modify the condition or the action and click "Replace".

Conditions can be based on:

All conditions are evaluated one after another, and whenever a condition is true, its action is performed.

If you need to perform a certain action always, regardless of the condition, use an empty Custom condition. All actions without conditions at the beginning of the list will always be executed. The first action with an empty condition at the end of the exclusive switch will be executed only if no other actions have been executed. Other actions with an empty condition in the exclusive switch will always be executed.

- copy the action from the action field to the buffer.

- paste the action from the buffer into the action field.

The same commands are also available in the action popup menu.

The Exclusive check box means that only one action is executed: the first one whose condition matches. If "Exclusive" is not checked, all actions whose condition matches are executed.

Current movie/menu - the "current movie" part of this option is used when a popup menu is assigned to more than one movie (for example when the menu contains the chapters of several movies). If it is checked, the condition "if Chapter in Movie M1 = ..." is only evaluated while the movie M1 is playing; it is skipped if the current movie is M2.
The "current menu" part of the option is used for the "Selected button" conditions.

You can use Custom to enter a custom condition. Press Ctrl+Space in the Custom condition field to open a completion list of the functions below, the user-defined variables and the user functions, narrowed down to the ones starting with the word you are typing. Inside quotes, Ctrl+Space lists the movies and playlists of the project instead.

WARNING: if your condition does not meet the requirements described above, you will get an error during compilation.

Custom condition examples:

Hotkeys: