Posts by Andreas

BECOME PART OF THE COMMUNITY - Sign up here

    If you accidentally have created an infinite loop, you can use the keyword ReloadPlugins (same as on gma2) to reset the Lua engine.


    In grandMA3, executing commands (like Go+, Off etc) are passed to the pluginscript, and it is up to the script to handle how to react to those commands.


    You can import the plugin "Execute Example" to see how it works:


    CD Plugin

    Import Library "Execute Example.xml"

    CD Root


    then look at the system monitor window to see the example plugin react to the executing commands, e.g.


    Go+ Plugin "Execute Example"

    Off Plugin "Execute Example"

    your code works for me and prints 20 in the system monitor, - as long as I add the missing closing tag of the function definition ( " end " )


    make sure that you haven't destroyed the function setmetatable in another plugin or earlier in your code by redefining it via bad code e.g.


    using


    setmetatable = {o, Window.mt}


    instead of


    setmetatable(o, Window.mt)

    Is this how it's supposed to work? yes


    forcing assert only applies to actions that normally doesn't assert (e.g. Go+)

    for actions like Go- and Goto, this cue-property has no effect, as the assert is already forced by the action.

    hi hoss,


    you are right, setting a value above 0 seems to automatically enable the exectime master, I was not aware of that.


    Please try to add some small wait-times (0.033s) in your macrolines, to force the commands to be executed in different calculation cycles, maybe that would improve stability.

    Another option is to enable and set timed execution (in deciseconds) before passing the FaderMaster command to the sequence:


    On Master "Grand"."ExecTime"

    Master "Grand"."ExecTime" At 30

    FaderMaster Sequence 8 At 100

    Off Master "Grand"."ExecTime"

    Not sure I understand what you are trying to do, but maybe the plugin example below can get you going..


    return function()


    local mytable = {question = 'Not sure', answer = 42}

    local vars = GlobalVars()


    for key,value in pairs(mytable) do

    SetVar(vars, key, value)

    end


    Cmd('GetGlobalVar *')


    end

    CurrentExecPage() returns the current page as an object.

    Depending on what you want from the object, try e.g.


    local mypage = CurrentExecPage()
    Echo(mypage.index)

    Echo(mypage.name)

    You can use Macro x.y to set options for line y of macro x.


    To access specific lines of multiple macros, use consistent labeling of macros and macrolines, and access them via name and wildcard (*)


    e.g. macro-names:


    Green CM

    Blue CM


    e.g. macroline-names:


    MyOptionalLineA

    MyOptionalLineB


    Set Macro "*CM"."MyOptionalLineA" "Enabled" "No"

    Set Macro "*CM"."MyOptionalLineB" "Enabled" "Yes"


    using names rather than number, preserves functionality even when moving macros, or inserting or deleting lines.

    The icon area of the MessageBox is not intended to support third party branding, or any other custom images.

    Please use an installed texture that reflects the functionality of your plugin, e.g. Texture 'wizard', or don't use an icon.

    GraphicsRoot.TextureCollect is a part of the installation, you cannot import textures on the fly.

    The GraphicsRoots contains the framework of your console's UI


    There is nothing in this branch, that is intended for custom/user-created data/objects.

    Hi Axel,


    Remotecommand now allow other arguments than IP-address


    try


    RemoteCommand IP "192.168.0.75" "Macro 7"

    or

    RemoteCommand OnPC "Axel-Laptop" "Macro 7"

    or

    RemoteCommand Console "FullsizeFOH" "Macro 7"

    Hi hoss,


    here's my take on the unclear parts:


    Colors can be an ID reference (name or number) to the Colorgroup class (CmdlineToken: Color)

    e.g.

    '1.22'

    'Global.AlertText'

    (actual color is defined by the current ColorTheme)


    Icon can be an ID reference (name or number) to the Texture class (CmdlineToken: Texture)

    '54'

    'wizard'


    blackFilter can be used to block specific characters from entering inputfield

    e.g.

    '$()*'


    whiteFilter can be used to allow specific characters only, to enter inputfield

    e.g.

    '0123456789.'


    vkPlugin can be a named ID reference to special virtual keyboards of the Menu class (CmdlineToken: Menu)

    e.g.

    'TextInputNumOnly'


    I suspect state-grouping to be intended for radiobutton style states, but possibly not yet implemented in the GUI-engine, as there is to my knowledge no internal generic message-boxes that so far uses this.


    Be aware that the error-message echoed when passing wrong arguments is misleading,

    At the moment the option and result tables seems to require and return numerical 1/0, not Lua boolean true/false

    maybe the code-examples below can help you understand some of the issues with you coding:


    (goto https://www.lua.org/cgi-bin/demo , paste the code and press run)



    These functions requires you to pass a pointer to the variable collection in question, as first argument.


    e.g current user

    SetVar(UserVars(),'model','T-1000')

    e.g. userprofile "Default"

    SetVar(ShowData().UserProfiles['Default'].Variables, 'manufacturer','Cyberdyne')

    e.g. globalvars

    SetVar(GlobalVars(),'mission','World domination')



    remember that Lua is case sensitive, your example Setvar would not work no matter what arguments you try to pass.

    as Lua alternative, the following should be sufficient:


    Lua "Cmd('Group ' .. TextInput('Group?')"


    converting to number is in this scenario a detour, as concatenating effectively converts x back to a string.