RPR NamedCommandLookup
From CockosWiki
(→NamedCommandLookup()) |
(→Examples) |
||
Line 14: | Line 14: | ||
==Examples== | ==Examples== | ||
===C++=== | ===C++=== | ||
- | < | + | <source lang=cpp> |
- | </ | + | </source> |
+ | |||
+ | |||
===Perl=== | ===Perl=== | ||
- | < | + | <source lang=perl> |
# | # | ||
# NamedCommandLookup.pl | # NamedCommandLookup.pl | ||
Line 39: | Line 41: | ||
$Clipboard -> Set("cmd_id=$cmd_id"); | $Clipboard -> Set("cmd_id=$cmd_id"); | ||
- | </ | + | </source> |
+ | |||
===Python=== | ===Python=== | ||
- | < | + | <source lang=python> |
- | </ | + | </source> |
+ | |||
==See Also== | ==See Also== | ||
{{SeeAlso_oncommand}} | {{SeeAlso_oncommand}} |
Revision as of 10:15, 29 January 2010
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR NamedCommandLookup
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR NamedCommandLookup
Contents |
NamedCommandLookup()
int NamedCommandLookup(const char* command_name)
This function allows you to call an extension command from within a ReaScript. Use the value returned by this function as the paramater wheb you call Main or MIDIEditor_OnCommand
The names of extension commands are available from the REAPER Action/Show Action List. Display the Action List and scroll right to see command IDs and names.
The command IDs (the numbers) for REAPER standard commands don't change but the command IDs for extension commands will probably be different for each user.
Parameters
const char* command_name # e.g. "_SWS_ABOUT"
Returns
int
Examples
C++
Perl
# # NamedCommandLookup.pl # # This example script copies its results to the Windows Clipboard, # run the script from within REAPER as normal, open up notepad and # Paste the clipboard into notepad to look at the result. Normally # you would use the $cmd_id returned to call Main_OnCommand so that # you can call an extension command from within a ReaScript. use strict; use warnings; use Win32::Clipboard; my $Clipboard = Win32::Clipboard(); my $cmd_id; $cmd_id = RPR_NamedCommandLookup('_SWS_ABOUT'); $Clipboard -> Set("cmd_id=$cmd_id");
Python
See Also
oncommand: Main_OnCommand, Main_OnCommandEx, MIDIEditor_OnCommand, NamedCommandLookup
(Section automatically generated, edits may be overwritten.)
Stuff
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR NamedCommandLookup
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR NamedCommandLookup