local action1 = 'action_command_ID'
local action2 = 40619
action1 = tonumber(action1) and action1 or reaper.NamedCommandLookup(action1)
action2 = tonumber(action2) and action2 or reaper.NamedCommandLookup(action2)
local old_action = tonumber(reaper.GetExtState('toggle action', 'action'))
local action = old_action == action1 and action1 or action2
local action_next = old_action == action1 and action2 or action1
reaper.Main_OnCommand(action, 0)
reaper.SetExtState('toggle action', 'action', tostring(action_next), true)
有错误呢?
运行后退画框提示 yqy Toggle Cursor On Stop.lua:5: unexpected symbol near '<\226>'
错误说是在这一行
local old_action = tonumber(reaper.GetExtState(‘toggle action’, ‘action’))