Child pages
  • Macro modules
Skip to end of metadata
Go to start of metadata

MacroModuleDemo.mp4

macro modules

Macro modules were introduced in openBEB version 2.81 BETA.

 

You can create a programmable module from a macro. Use the command

!macroModule::"Unique module name"

Afterwards you can send commands to this modules as described below. Note, that a macro module also can provide a window based user interface, which can be configured by macro commands. To this end use 

!tellmodule::"Unique module name"
.Macro module commands 

Use the !get command to retrieve values of the button and option fields (see example).

Macro module commands

button

Configures the button of a macro module window

Usage

button::option::value

Options are:

  • visible::value: Shows (value=1) the button, or hides (value =0) the button.
  • caption:: stringvalue: Sets the caption (above the button) text.
  • text::stringvalue: sets the boolean text (on the button).

option

Configures the option fild of a macro module window

Usage

option::option::value

Options are:

  • visible::value: Shows (value=1) the button, or hides (value =0) the button.
  • caption:: stringvalue: Sets the caption (above the button) text.
  • list::list of values: Provides a list of values for selection in the options field. This list is a string separated by "::"

progress

Configures the progress bar of a macro module window

Usage

button::option::value

Options are:

  • visible::value: Shows (value=1) the button, or hides (value =0) the button.
  • caption:: stringvalue: Sets the caption (above the button) text.
  • max: Maximum value of the progress bar. Note, that the minimal value is always 0.
  • value: actua; value displayed.

string

sets the information string of the window.

Usage

string::string to display

windowtitle

Configures the the string displayed in the window bar.

Usage

windowtitle::String to display

frontpanelState

Configures the state of the window

Usage

frontpanelState::option

Options are:

  • hidden: The window is not displayed
  • Default: The window is shown.

 

windowtype

Configures the window type used for the macro module window

Usage

windoetype::option

Options are:

 

    • modal: Uses a modal window. Note that this blocks user access to other windows of openBEB.
    • Floating: The window is floating above other windows, but does not block access to other graphical elements.
    • normal: Normal window.

Default is floating.

wait

Waits for user interaction. Use !waitmodule coomand following this command to stop macro execution, until user interaction was performed (see example).

Usage

wait::option

Options are:

  • button: Button value change
  • option: option value change

Example

The following example demonstrates some of the configuration options. Furthermore, standard module commands applied to macro modules are demonstrated.

Macor module example
pragma.version(1)
# This macro tests the action routines implemented in the CORE porgam 2.81
!macroModule::testaction
#
!tellmodule::testaction
.frontpanelState::visible
.windowtype::modal
.windowtitle::This is a macro module demonstration
.string::First the module window is shown in the modal mode. No user access to openBEB.
!wait::1000
!tellmodule::testaction
.string::Button options!
.button::text::Testtext
#
!wait::2000
!tellmodule::testaction
.button::text::Proceed
.string::Press button to proceed. The window will be hiffen for 3s.
.wait::button::-1
.!waitmodule::testaction::-1
.button::visible::0
.frontpanelState::hidden
#
!wait::3000
!tellmodule::testaction
.frontpanelState::Default
.windowtype::floating
.string::Floating mode of window. openBEB GUI is accessible.
!wait::1000
!tellmodule::testaction
.string::Progressbar can be shown and configured.
.progress::visible::1
.progress::max::3
.progress::value::0a
!do::4::index
.!tellmodule::testaction
..progress::value::{index}
..string::Progressbar can be shown and configured. Step {index}
.!wait::1000
!tellmodule::testaction
.option::visible::1
.progress::visible::0
.button::visible::1
.string::Please select below an option:
.option::caption::What are you?
.option::list::Your are nice::You are beatutiful::You are stupid
.windowtype::modal
.button::text::Proceed
.wait::button::-1
.!waitmodule::testaction::-1
.!get::answer::option
.stop
!ask::{answer}!::Yes
#

Demo

This demo demonstrates the execution of the example macro above:

  • No labels
Write a comment…