Question: Could you provide a working example for PromptForAction in C++?
Asked by Navelpluisje (62.45.64.x) on October 7 2024, 3:22pm
Reply on October 8 2024, 12:33am (edited at October 8 2024, 12:38am):C++ would require too much boilerplate, here's lua, but you'd use a timer rather than defer() etc:
function run()
hit = reaper.PromptForAction(0,0,0)
if hit == 0 then
reaper.defer(run) -- keep trying until PromptForAction succeeds or fails
else
reaper.MB(string.format("action %d",hit),"action sel",0)
end
end
reaper.PromptForAction(1,0,0)
reaper.defer(run())