RPR Main OnCommandEx
From CockosWiki
| Revision as of 00:12, 6 November 2009 MikeLacey (Talk | contribs) ← Previous diff |
Revision as of 00:15, 6 November 2009 MikeLacey (Talk | contribs) Main_OnCommandEx() Next diff → |
||
| Line 1: | Line 1: | ||
| {{API_Doc_Header}} | {{API_Doc_Header}} | ||
| =Main_OnCommandEx()= | =Main_OnCommandEx()= | ||
| - | void Main_OnCommandEx(int command, int flag, void* proj) | + | '''void Main_OnCommandEx(int command, int flag, void* proj)''' |
| + | |||
| + | You can call any REAPER action from ReaScript by using this API function. | ||
| + | |||
| + | e.g. RPR_Main_OnCommand(actionnumber, 0) | ||
| + | |||
| + | Find the action number for a given action by opening the Actions list, scroll the window right to show the action numbers. For example, from ReaScript you can call the REAPER action "Item: Split item under mouse cursor", like this: | ||
| + | |||
| + | RPR_Main_OnCommand(40746, 0) | ||
| + | |||
| + | This and the RPR_MIDIEditor functions are the APIs you need to start with if you're going to use ReaScript as an advanced macro language. | ||
| ==Parameters== | ==Parameters== | ||
Revision as of 00:15, 6 November 2009
Main Page/REAPER Documentation/ReaScript/ReaScript API/RPR Main OnCommandEx
Main Page/REAPER Documentation/REAPER API/REAPER API Functions/RPR Main OnCommandEx
Contents |
Main_OnCommandEx()
void Main_OnCommandEx(int command, int flag, void* proj)
You can call any REAPER action from ReaScript by using this API function.
e.g. RPR_Main_OnCommand(actionnumber, 0)
Find the action number for a given action by opening the Actions list, scroll the window right to show the action numbers. For example, from ReaScript you can call the REAPER action "Item: Split item under mouse cursor", like this:
RPR_Main_OnCommand(40746, 0)
This and the RPR_MIDIEditor functions are the APIs you need to start with if you're going to use ReaScript as an advanced macro language.
Parameters
int command, int flag, void* proj
Returns
void
Examples
Perl
Python
See Also
Stuff
Main Page/REAPER Documentation/ReaScript/ReaScript API/RPR Main OnCommandEx
Main Page/REAPER Documentation/REAPER API/REAPER API Functions/RPR Main OnCommandEx
Categories: API | ReaScript | Perl | Python
