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!
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!
Commandline (pop-ups) currently only support input of "strings", not numbers....
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()]
local Index = {}
Index[1] = MacroStartIndex
Index[2] = AppearanceStartIndex
local function Startup()
Cmd("Delete Appearance" .. Index[2])
end
local function StorequestionAppearance(display_handle)
local Appearancequestion = "Select were the Appearance should be stored?"
local AppearanceStartIndex = tonumber(TextInput(Appearancequestion));
if AppearanceStartIndex ~= nil then
Startup()
end
end
Display More
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
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)
Wow such a simplified answer with so much helpful content!!!
Thank you so much!!!
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:
(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
If you want to set a predefined text, and not trigger the label popup, instead of Label, use the Set function (on the Name property):
Set Sequence Property "Name" "2 Part"
and if i want to assign a executor config to the selected sequence without typing sequence 1001 ?
Exec Configs are assigned to Executors, not to Sequences.
I'm sorry i mean, exec config to selected exec
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"
Don’t have an account yet? Register yourself now and be a part of our community!