View Single Post
Old 05-05-2021, 02:48 PM   #5
Kaxaze music
Human being with feelings
 
Kaxaze music's Avatar
 
Join Date: Sep 2020
Posts: 107
Default

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()

Last edited by Kaxaze music; 05-05-2021 at 03:33 PM.
Kaxaze music is online now   Reply With Quote