Like cycle action editor where a step is used to make a toggle, similarly any way to make that in reascript?
Edited - Ok so, i found what i wanted and here's what it end up looking like
Code:
function step_1()
--code that will happen at first iteration and so on...
end
function step_2()
--code that will happen at Second iteration and so on...
end
function main()
local a = reaper.GetToggleCommandState("of some action")
if a == 0 then
step_1()
end
if a == 1 then
step_2()
a = a - 1 --or a = 0
end
end
main()