justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.


Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [recent comments] | [all]

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


Comments:

Comment:
    Your Name:   -- Site Owner's Name:  (for human-verification)

    Comment:    

    
  
[back to index] | [unreplied] | [replied] | [recent comments] | [all]
Copyright 2024 Justin Frankel. | RSS