started playing a little with the suggested code and have gotten my first error:
Quote:
toolbartest-01_GUI.lua:27: <name> expected near '"XF ON"'
|
i decided to try making two buttons, one to enable, the other to disable 'crossfade on split.' started by taking a test script generated by the gui builder and editing the code into it. here's what threw the error:
Code:
-- Script generated by Lokasenna's GUI Builder
local lib_path = reaper.GetExtState("Lokasenna_GUI", "lib_path_v2")
if not lib_path or lib_path == "" then
reaper.MB("Couldn't load the Lokasenna_GUI library. Please run 'Set Lokasenna_GUI v2 library path.lua' in the Lokasenna_GUI folder.", "Whoops!", 0)
return
end
loadfile(lib_path .. "Core.lua")()
GUI.req("Classes/Class - Button.lua")()
-- If any of the requested libraries weren't found, abort the script.
if missing_lib then return 0 end
GUI.name = "New script GUI"
GUI.x, GUI.y, GUI.w, GUI.h = 0, 0, 1024, 240
GUI.anchor, GUI.corner = "mouse", "C"
local toolbar_buttons = {
{ label: "XF ON", command: 40927 },
{ label: "XF OFF", command: 40928 },
}
local button_width = 62
for k, v in ipairs(toolbar_buttons) do
GUI.New("btn_"..k, "Button", (k - 1) * button_width, 0, button_width, 24, caption = v.label, func = function() reaper.Main_OnCommand(v.command, 0) end)
end
GUI.Init()
GUI.Main()
can i get a suggestion as to how to get this to work? if someone can show me, i should be able to create the rest of the buttons myself (i think).
edit:
tried looking at the example scripts but couldn't decipher them.
thanks,
babag