Skip to content

Macro commands

Oliver Tseng edited this page Jun 22, 2022 · 12 revisions

Keyword commands

Lines that start with # are comments.

# This is a comment

Go to another part of the macro file. Labels start with :

:Label

Goto Label

Lines that start with config. can access config values and also perform expressions

config.test = 0
config.test = config.test + 1

If command

if config.test == 0
. displayMessage equals 0
elif config.test == 1
. displayMessage equals 1
else
. displayMessage not 0 or 1
fi

Note: if commands can be nested

Access config values with curly brace

. displayMessage {mainText}
. displayMessage {commentaryText}

Getting selected text

. getSelectedText
if config.selectedText
CONCORDANCE:::KJVx:::{selectedText}
fi

Getting clipboard text

if config.clipboardText
CONCORDANCE:::KJVx:::{clipboardText}
fi

UBA commands

Any non-keyword command will be processed as a UBA command

MAIN:::KJV:::John 3:16
COMPARE:::John 3:16
PARALLEL:::NIV_CCB_CEB:::John 3:16

Macro dot commands

A line that starts with . executes the method in MainWindow.py. Format is ". method_name param_1, param_2".

Output

. displayMessage Hello, Hola

Application Window

Full size

. fullsizeWindow

Medium size

. twoThirdWindow

Top half

. topHalfScreenHeight

Bottom half

. bottomHalfScreenHeight

Left half

. leftHalfScreenWidth

Right half

. rightHalfScreenWidth

Move window

. moveWindow x, y

Study Window

Set the size of the study window. 0 removes study window. 4 maximizes study window.

. setParallelSize [0-4]

Instant Window

Set the size of the instant window. 0 removes instant window. 3 maximizes instant window.

. setInstantSize [0-3]

Enable/disable instant information

. enableInstantInformation

. disableInstantInformation

Toolbars

Show/hide main toolbar

. showMainToolBar

. hideMainToolBar

Show/hide secondary toolbar

. showSecondaryToolBar

. hideSecondaryToolBar

Show/hide left side toolbar

. showLeftToolBar

. hideLeftToolBar

Show/hide left side toolbar

. showRightToolBar

. hideRightToolBar

Font

Set the font size

. setFontSize [1-100]

Bible view

Reloads the current record

. reloadCurrentRecord

Misc

Pause the macro execution and wait for either a space or q press. If an integer is provided, will wait for X seconds, otherwise will wait for spacebar to be pressed.

. pause (secs)

Examples

Macro examples

Clone this wiki locally