Quote:
Originally Posted by Lokasenna
The API function I'm using doesn't work with scripts. I'll look, but I don't think there's a different function that would.
|
The textual command IDs must be converted with NamedCommandLookup before they can be used with Main_OnCommand:
Code:
local userinput = "_RSf9af5a881a603f63b4ac8574e6736996fc85eaf5"
-- local userinput = 1234
local runtime_id = reaper.NamedCommandLookup(userinput)
if runtime_id > 0 then -- if the script/action is loaded
reaper.Main_OnCommand(runtime_id, 0)
end
(The support for running scripts using Main_OnCommand was added in v5.12)