Posts by Andreas


    to share data between components, you could use the table-reference that is passed as third argument to all components of a plugin:

    Code: component 1
    local helpers = select(3, ...) 
    return function()
    Code: component 2
    local helpers = select(3, ...)
    function helpers.subtract(a, b)
      return a - b
    return function()end

    avoiding globals and keeping execution within the Lua engine would be preferable yes.

    here's an approach that avoids both globals and invoking the commandline interpreter:

    Two issues:

    1) The string concatenation isn't working correctly.

    2) Illegal Property "command"

    1. don't use equal sign in the variable assignment

    2. quote the recall of the variable

    + address the cuepart (of the current cue), to prevent value to be directed to all cues if no current cue exists (the sequence is off)

    SetUserVariable NewBPM ("Enter Speed Master BPM")

    SetUserVariable BpmCmd "Master 3.1 at BPM "$"NewBPM"

    Set Part 0 Property "Command" $"BpmCmd"

    For instance I'm trying to create a macro to help setting a speed master on the first cue of a song.

    Set Cue "CueZero" Property "Command" "Master 3.1 at BPM "("Enter Speed Master BPM")

    Desired workflow.

    1) Press the desired Command column field on the desired cue.

    2) Press the macro preset.

    3) Type a speed value. (example:123)

    4) Press Enter and done.

    Plausible workflow:

    1) Press the macro preset

    2) Press the desired cue in the seq sheet, any field (or type cue x)

    3) Type a speed value. (example:123)

    4) Press Enter and done.

    ChangeDestination [Execute = No]

    Set 0 Property "Command" "Master 3.1 at BPM "("Enter Speed Master BPM")

    ChangeDestination Root

    be aware that the actual currentpage of a station may also change when another datapool is selected, or a different user logs on.

    return function()
    local cmdline_syntax = "Preset 4.1"
    local table_with_objects = ObjectList(cmdline_syntax)
    local object = table_with_objects[1] or error("could not find "..cmdline_syntax)

    please note that the selectiongrid information is brought into the programmer when attributes are given values

    the current selection and selectiongrid has no relevance in the moment of storing the preset.

    you need to transpose the grid before applying the colors

    in my experience TextAutoAdjust only will reduce the font-size if there is not enough space even after wrapping.

    If this is an issue for you, wrap manually by including linebreaks (/n) in the text string

    Delete ScreenContent 1.*

    Store ScreenContent 1.1 Property "Name" "WindowLayoutView" "X" 0 "Y" 0 "W" 16 "H" 12

    Store ScreenContent 1.2 Property "Name" "WindowLayoutPool" "X" 0 "Y" 12 "W" 16 "H" 2

    from your posts, it seemed like you knew how to use the Lua function CmdIndirectWait('comandline syntax goes here')

    e.g. your lua code CmdIndirectWait('MAtricks "X/ w2"') and CmdIndirectWait('Highlight On')

    as apparently this is not the case, try the following Lua code:

    CmdIndirectWait('Set Selection MAtricks "XWings" 2')