Macro pop-up

BECOME PART OF THE COMMUNITY - Sign up here

  • Hi!
    What is the syntax to create a pop-up in a macro to call a group or preset?
    In MA2 it is (), but in MA3 the value that is written in the pop-up appear in quotation marks.

    Thanks!

  • As usual, LUA to the rescue.


    As a work around you could do something like this:

    Lua'local x = tonumber(TextInput("Group?")); Cmd("Group " .. x);'


    Lua has a tonumber function that tries to take a string and convert it to a int or float.


    If you entered a string like "six" this would cause a LUA error. so slightly modifying it to:


    Lua'local x = tonumber(TextInput("Group?")); if x ~= nil then Cmd("Group " .. x)end;' 


    Would not cause the error, and just not do anything if you did not enter a number.

  • 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.

  • I tryed the following plugin, what is wrong? It only executes the TextInput, but after that nothing [and yes I executed the StorequestionAppearance()]

    Error:

    LUA Runtime Error :9: bad argument #1 to 'tonumber' (value expected)


    My Input is just a number like 100


    My Input into the AppearanceStartIndex is 100

  • I wanna make a small lua script for a Selected Executor.
    Label selected executor for example. Is it possible to make a Lua that makes a Variable of the selected Executor ?

  • I wanna make a small lua script for a Selected Executor.
    Label selected executor for example. Is it possible to make a Lua that makes a Variable of the selected Executor ?

    Don't need Lua for this. Here's your macro line:

    • Label Sequence

    (Don't put a sequence number and it will act on the selected sequence)

  • i know, but then its not possible to say Label Sequence with a predifined text in it.
    I wanna say Label 2 Part for example

  • As Ryan said, there is no spoon


    When you apply the Select command to an executor, it will pass it to the sequence and select that sequence, not the exec.

    try to assign the same sequence to two different exec. e.g. 201 and 211 and you will see that both seems to get selected, as it is the sequence that actually gets selected.


    Nevertheless, your earlier post indicates that your macro knows the name of the sequence.

    As executors take the name of the assigned object you can use that name to access the exec:


    Set Sequence Property "Name" "2 Part"

    Assign Configuration "Flash Button" At Executor "2 part"